simple laravel docker set based on a digital ocean example
- separate nginx and fpm containers
- separate networks for API and WEB context
- mailhog for testing emails
- clone the project
$ git clone https://github.com/HijenHEK/laravel-docker-setup.git
- copy files to your project directory
$ cp -r laravel-docker-setup/* <your-laravel-project-directory>
- add the env variable to your .env or use default values
SERVER_USER
SERVER_USER_UID
DB_DATABASE
DB_PASSWORD
DB_PASSWORD
DB_USERNAME
FORWARD_DB_PORT
APP_PORT
MAIL_PORT
MAILHOG_PORT
- build and create your containers
$ docker-compose up -d --build