blob: 8726aee57db5ca6e74e67eaafd17753ef06c667b [file]
# TODO: use extends to avoid duplication
version: '3.8'
services:
db:
image: postgres:12
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -P password" ]
interval: 10s
timeout: 5s
retries: 5
backend:
container_name: ui-backend
image: dagworks/ui-backend:latest
build:
context: backend
dockerfile: Dockerfile.backend-prod
entrypoint: ["/bin/bash", "-c", "cd /code/server && ./entrypoint.sh"]
ports:
- "8241:8241"
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=postgres
- DB_USER=postgres
- DB_PASSWORD=password # TODO: Change this to a secret
- HAMILTON_BLOB_STORE=local
- HAMILTON_ENV=local # local env
- HAMILTON_LOCAL_BLOB_DIR=/data/blobs # TODO -- set this up to be a better one
- DJANGO_SECRET_KEY=do_not_use_in_production
- HAMILTON_TELEMETRY_ENABLED=${HAMILTON_TELEMETRY_ENABLED-true}
- HAMILTON_AUTH_MODE=permissive
depends_on:
- db
volumes:
- backend_data:/data/
frontend:
container_name: ui-frontend
image: dagworks/ui-frontend:latest
build:
context: frontend
dockerfile: Dockerfile.frontend-prod
args:
- NGINX_PORT=8242
- REACT_APP_AUTH_MODE=local
- REACT_APP_USE_POSTHOG=false
ports:
- "8242:8242"
environment:
- NGINX_PORT=8242 # NB Custom port won't be visible in console & will mean the backend's shortcut will fail
- NODE_ENV=development
- REACT_APP_AUTH_MODE=local
- REACT_APP_USE_POSTHOG=false
- REACT_APP_API_URL=http://backend:8241
depends_on:
- backend
volumes:
postgres_data:
backend_data: