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
-
Copy .devcontainer folder to your project root
-
Push to repo
-
Access repo GitHub page, open in CodeSpaces
-
Container should build and IDE should open ready for use
-
Create a
.env
file from the example.
cp .env.example .env
- 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
- Install the packages
composer install
- Generate Key. Migrate DB structure and create Twill superadmin
php artisan key:generate
php artisan migrate
php artisan twill:superadmin
- 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.
- 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