generate laravel project with docker :
- php
- mysql
- redis
- node
- composer
- nginx
- cron job (default : 60 s)
git clone git@github.com:okirim/generate-laravel-stack-with-docker.git
step 2: create new laravel project
docker-compose run --rm composer create-project laravel/laravel . --prefer-dist
docker-compose up -d server
step 4: replace the .env file
cp docker.env ./laravel/.env
docker run --rm -v /var/www/vendor composer require predis/predis
docker run --rm -v /var/www/vendor composer require example_package
docker run --rm -v /var/www/node_modules npm install example_package
how to use artisan command:
docker run --rm artisan make:model Post
for an already existing project
- for an already existing project you must create a folder named laravel and put the project files in it (ignore step 2)