Inspired by :
Install docker and docker-compose ;
- Copy
docker-compose.yml
file to your project root path, and edit it according to your needs ; - From your project directory, start up your application by running:
docker-compose up --build
- If you want, you can run composer or artisan through docker. For instance:
docker-compose exec php composer install
docker-compose exec php php artisan migrate
docker-compose exec php $yourCommandHere
- In Addition, you can work inside the container:
docker-compose exec php ash
These docker images are configured in docker-compose.yml
file. You can comment or uncomment some services according to your project.
gbelot2003/docker-laravel*php*1:latest (this docker image extends
php:7.4-fpm-alpineto add some PHP extensions)
;gbelot2003/docker-laravel*site*1:latest (this docker image extends
nginx:latestto add Laravel vhost)
;mysql:5.7.29
;postgres:9.6-alpine
;redis:latest
;Node:13.7
;
Contributions are welcome! Leave an issue on Github, or create a Pull Request.
This work is under MIT licence.