Newer
Older
version: '3'
services:
php:
build:
context: ./api
depends_on:
- db
env_file:
- ./api/.env
# Comment out these volumes in production
volumes:
# If you develop on Linux, uncomment the following line to use a bind-mounted host directory instead
# - ./api/var:/srv/api/var:rw
api:
build:
context: ./api
depends_on:
- php
ports:
volumes:
- ./api/public:/srv/api/public:ro
cache-proxy:
build:
context: ./api
depends_on:
- api
# Comment out this volume in production
volumes:
- ./api/docker/varnish/conf:/etc/varnish:ro
ports:
db:
# In production, you may want to use a managed database service
environment:
- POSTGRES_DB=api
- POSTGRES_USER=api-platform
# You should definitely change the password in production
- POSTGRES_PASSWORD=!ChangeMe!
volumes:
- db-data:/var/lib/postgresql/data:rw
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
# - ./docker/db/data:/var/lib/postgresql/data:rw
ports:
- "5432:5432"
client:
# Use a static website hosting service in production
# See https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#deployment
- ./client:/usr/src/client:rw,cached
admin:
# Use a static website hosting service in production
# See https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#deployment
- ./admin:/usr/src/admin:rw,cached
h2-proxy:
# Don't use this proxy in prod
build:
context: ./h2-proxy
depends_on:
- client
- cache-proxy
ports:
- "443:443"
- "444:444"
volumes:
db-data: {}