Skip to content

This repo provides the .devcontainer files needed to start a CodeSpace for Statamic on GitHub.

License

Notifications You must be signed in to change notification settings

Maldicore/PHP-Statamic-CodeSpaces-DevContainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-Statamic-CodeSpaces-DevContainer

This repo provides the .devcontainer files needed to start a CodeSpace for Statamic on GitHub.

Instructions

  1. Copy .devcontainer folder to your project root
  2. (Optional) Copy init_codespace.sh to project root
  3. Push to repo
  4. Access repo GitHub page, open in CodeSpaces
  5. Container should build and IDE should open ready for use
  6. (Optional) Run start.sh to create .env, admin user, clear caching, update search and generate assets
    . ./start.sh
  7. To access your site use port forwarding by serving the application
    serve
    #or
    php artisan serve --port=8000 --host=0.0.0.0

MariaDB (ENV settings)

Please set your DB env variables to the following to use the MariaDB docker container

DB_CONNECTION=mysql
DB_HOST=mariadb
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=secret

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

Credits/Inspirations

https://github.com/mechawrench/php-laravel-codespaces-devcontainer https://github.com/PMessinezis/vscode.laravel.devcontainer/blob/master/Dockerfile

About

This repo provides the .devcontainer files needed to start a CodeSpace for Statamic on GitHub.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published