Laravel Up and running in docker containers stack => php 7, Redis, Mongodb , mysql and Nginx
- Easy To use
- Built for Humans
# you should run this one only for the first time [install deps]
make install
# mysql config
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=dockerized_lara
DB_USERNAME=lara_user
DB_PASSWORD=root
#redis Config
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379
#mongodb config
DB_CONNECTION=mongodb
DB_HOST=mongo
DB_PORT=27017
DB_DATABASE=dockerized_lara
make php # access php image
make up # to start you docker
make down # to stop all containers
make clear # delete log file content + clear redis cache
Add an entry 127.0.0.1 dockerized_lara.local
to your /etc/hosts
file:
echo "127.0.0.1 dockerized_lara.local" >> /etc/hosts
echo "127.0.0.1 mysql" >> /etc/hosts
Open your browser and visit dockerized_lara.local:8001
and Enjoy
Available tasks:
install Init your project
up Docker compose up
down Docker compose down
clean Remove unused containers & images
clear Clear logs and flush redis
exec Execute command inside docker php
php Access php image
.
├── Makefile
├── app
├── docker
│ ├── files
│ │ ├── dockeried_lara.ini
│ │ └── nginx.conf
│ ├── mongo
│ │ └── Dockerfile
│ ├── nginx
│ │ └── Dockerfile
│ ├── php
│ │ └── Dockerfile
│ └── redis
│ └── Dockerfile
├── docker-compose.yml
└── readme.md