Docker container for laravel apps, in this case vslcatena/mensa
APP_NAME = mensa (must be EXACTLY the same as repo name!)
APP_REPO = https://github.com/vslcatena/mensa.git
- Initial commit
- basic non-working app
- Revised build and docker-compose.yml
- port bind on 1234
- clear folder structure
- bind mount on laravel-app folder and sql database for persistent storage.
- README.md
- Easy spawn of mensa app
- No 'installation' on host device
- Instant edit of Laravel app files
- Standardize environment of Laravel App
-
https://github.com/vslcatena/mensa or any other laravel app
-
Time... On a Raspberry Pi4 this takes about 23 minutes. Primarily due to the Laravel packages in build process (Step 13/18 : RUN php ./composer.phar install).
-
git clone https://github.com/vslcatena/docker-laravel
-
Get .env.example from your repo and fill in your variables
-
Check configuration in docker-compose
-
screen -R APP_NAME
-
docker-compose up --build
-
Wait 25 minutes , grab some coffee
-
Access your server files on ./laravel-app/APP_NAME (instant-edit using bind mount)
-
Visit Laravel website on http://{docker-host}:1234
- Dockerfile
- docker-compose.yml
- README.md
- above mentioned files
- ./etc
- config of php
- config of mysql
- config of apache2
- ./laravel-app/APP_NAME
- laravel app APP_NAME
- .env
- configuration of application
- Go to ./laravel-app/{laravel_app_name}
- Do git stuff
-
App wont start.
- Check error in build and report back with issue
-
How to start over?
- Remove ./laravel-app
- Remove ./etc
- Remove all older images and containers
docker image prune
docker container prune
docker image rm {REPOSITORY_IMAGE_NAME ie. 'docker-mensa_app'}