forum/docker-compose.yml
2020-06-11 19:46:15 +02:00

52 lines
1.2 KiB
YAML

version: "3.4"
services:
php:
build:
context: .
target: symfony_php
args:
SYMFONY_VERSION: ${SYMFONY_VERSION:-}
STABILITY: ${STABILITY:-stable}
SERVER_NAME: ${SERVER_NAME:-localhost}
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
volumes:
# Comment out the next line in production
- ./:/srv/app:rw,cached
# If you develop on Linux, comment out the following volumes to just use bind-mounted project directory from host
- /srv/app/var/
- /srv/app/var/cache/
- /srv/app/var/logs/
- /srv/app/var/sessions/
environment:
- SYMFONY_VERSION
nginx:
build:
context: .
target: symfony_nginx
depends_on:
- php
volumes:
# Comment out the next line in production
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
- ./public:/srv/app/public:ro
ports:
- "80:80"
# This HTTP/2 proxy is not secure: it should only be used in dev
h2-proxy:
build:
context: .
target: symfony_h2-proxy
depends_on:
- nginx
volumes:
- ./docker/h2-proxy/default.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "443:443"