Build/docker-compose.yaml
version: '3'
services:
app:
build:
context: .
depends_on:
- mysql
- mail
volumes:
- ./../:/app/:cached
- /tmp/debug/:/tmp/debug/:cached
- ./:/docker/:cached
# cap and privileged needed for slowlog
cap_add:
- SYS_PTRACE
privileged: true
environment:
VIRTUAL_HOST: ${BASE_VHOST:-customername.docker}
VIRTUAL_PORT: 80
POSTFIX_RELAYHOST: "[mail]:1025"
env_file:
- etc/environment.yml
- etc/environment.development.yml
#######################################
# MySQL server
#######################################
mysql:
build:
context: docker/mysql
dockerfile: MariaDB-10
ports:
- 13306:3306
volumes:
- /tmp/debug/:/tmp/debug/
- db:/var/lib/mysql
env_file:
- etc/environment.yml
- etc/environment.development.yml
#######################################
# Mailhog
#######################################
mail:
image: mailhog/mailhog
environment:
- VIRTUAL_HOST=mail.${BASE_VHOST:-customername.docker}
- VIRTUAL_PORT=8025
env_file:
- etc/environment.yml
- etc/environment.development.yml
volumes:
db:
driver: local