- Repository:
- A docker-compose workflow for local Laravel development.
- Stack: Laravel, PHP, MySQL.
- Services: Nginx, MySQL, NPM.
- Year: 2020.
A pretty simplified docker-compose workflow that sets up a LEMP network of containers for local Laravel development.
Browse your projects location and run:
git git@github.com:diegoulloao/laravel-docker-startpoint.git project-name
First add your entire Laravel project to the src
folder or browse in and run:
laravel new
Run:
docker-compose up --build
Open up your browser of choice to http://localhost:8080 and you should see your Laravel app running as intended. Your Laravel app needs to be in the src directory first before bringing the containers up, otherwise the artisan container will not build, as it's missing the appropriate file.
New: Three new containers have been added that handle Composer, NPM, and Artisan commands without having to have these platforms installed on your local computer. Use the following command templates from your project root, modifiying them to fit your particular use case:
docker-compose run --rm composer update
docker-compose run --rm npm run dev
docker-compose run --rm artisan migrate
Containers created and their ports (if used) are as follows:
- nginx -
:8080
- mysql -
:3306
- php -
:9000
- npm
- composer
- artisan
--
Forked from https://github.com/aschmelyun/docker-compose-laravel
@aschmelyun · @diegoulloao · 2020