Krisell / gkk-anmalan

Göteborg Kraftsportklubb (GKK) Anmälningsweb
https://anmalan.gkk-styrkelyft.se
0 stars 1 forks source link

Install Laravel Sail for Docker for local dev #65

Closed Krisell closed 2 months ago

Krisell commented 2 months ago

Inspired by https://github.com/Krisell/gkk-anmalan/pull/64

This installs Laravel Sail, the Laravel first party Docker integration for local development. https://laravel.com/docs/11.x/sail

I prefer to run Laravel projects directly on my local device (using Laravel Herd), but for anyone that doesn't want to install php and other dependencies, this might simplify development.

Usage

APP_PORT=8080 vendor/bin/sail up (port 80 is default, but we could change default to a port that is less likely to be in use)

npm and artisan commands can be run inside the container by sail artisan X and sail npm run Y

Local files are shared with container via a volume, so development can be done against local files and changes should reflect automatically without restarting or rebuilding docker image.