
Use cached strategy on volume ( the host’s view is authoritative (permit delays before updates on the host appear in the container) to optimize container performance. Docker documentation on this : https://docs.docker.com/docker-for-mac/osxfs-caching/#tuning-with-consistent-cached-and-delegated-configurations
43 lines
1.0 KiB
YAML
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,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: .
|
|
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'
|