Files
forum/docker-compose.yaml
Kévin Dunglas 6a348748e7 Merge pull request #21 from maxhelias/proxy-nginx
Reverse proxy with nginx
2018-06-26 09:14:16 +02:00

43 lines
1.0 KiB
YAML

version: '3'
services:
app:
build:
context: .
args:
SYMFONY_VERSION: ${SYMFONY_VERSION}
STABILITY: ${STABILITY}
volumes:
# Comment out the next line in production
- ./:/srv/app:rw
# 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: .
dockerfile: ./Dockerfile.nginx
depends_on:
- app
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: .
dockerfile: ./Dockerfile.h2-proxy
volumes:
- ./docker/h2-proxy/default.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- '443:443'