sauron / twill-codespaces

Files and instructions for running Codespaces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twill - CodeSpaces

Inspired by microsoft/vscode-remote-try-php template, you can use the .devcontainer files to start a Twill project into GitHub CodeSpaces.

Instructions for generating the Codespace

  1. Copy .devcontainer folder to your project root

  2. Push to repo

  3. Access repo GitHub page, open in CodeSpaces

  4. Container should build and IDE should open ready for use

  5. Create a .env file from the example.

    cp .env.example .env
  1. Add the DB env variables to use the MariaDB defined in the docker container. Also add the ADMIN_APP_PATH due to codespaces right now can't redirect subdomains at the moment.
ADMIN_APP_PATH=admin

DB_CONNECTION=mysql
DB_HOST=mariadb
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=secret
  1. Install the packages
    composer install
  1. Generate Key. Migrate DB structure and create Twill superadmin
    php artisan key:generate
    php artisan migrate
    php artisan twill:superadmin
  1. Build the FE. Assuming NPM by default. Adjust it to your needs if you are using yarn or anything else.
    npm install
    npm run dev

Accesing the Site.

  1. In order to access the site use the alias
    serve

or port forwarding by serving the application with

    php artisan serve --port=8000 --host=0.0.0.0

Notes

  • CodeSpaces is currently in Closed Beta, you need access to use .devcontainer files
  • Includes the following PHP extensions, you can add your own by adjusting the DOCKERFILE
    • bcmath mysqli pdo pdo_mysql zip
  • To access your site you need to run the following alias:
    serve

Dockerfile and devcontainer.json based on:

https://github.com/PMessinezis/vscode.laravel.devcontainer/

About

Files and instructions for running Codespaces

License:MIT License


Languages

Language:Dockerfile 100.0%