Opinionated ready-to-use docker for PHP (Laravel) apps
- nginx
- php-fpm (php 7.2)
- mysql 5.6
- mailcatcher
- composer
- node.js
- php extensions: mysql & sqlite3
- Set APP_PORT to access the app from
localhost:MYSQL_PORT
- Set MYSQL_PORT to access the sql database with SequelPro with
host = localhost
andport = MYSQL_PORT
- Put your PHP app inside the
workspace
dir cd deployment && cp .env.example .env
- Set your environment variables
- Execute
docker-compose build
from thedeployment
dir - Once finished, run
docker-compose up -d
to start the containers - First time run will take longer (some images will have to download)
dup='docker-compose up -d'
ddown='docker-compose down'
dps='docker-compose ps'
drr='ddown && dup'
dphp='docker exec -it php-server /bin/bash'