Files
kennethreitz e41d1a8526 compose: pass S3 custom domain and addressing style through
Needed for the MinIO storage flip; unset values fall back to the
Tigris defaults in settings.py.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 02:15:05 -04:00

68 lines
2.4 KiB
YAML

# Production compose for Dokploy (mercury.kennethreitz.org).
# Web + Celery worker share one image; Postgres is a Dokploy-managed
# database (exiftree-db) reached over dokploy-network. Env vars are
# injected by Dokploy from the compose service's Environment tab.
services:
web:
build: .
command: uv run python manage.py runbolt --host 0.0.0.0 --port 8000
expose:
- "8000"
environment:
- DEBUG=${DEBUG}
- SECRET_KEY=${SECRET_KEY}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
- CSRF_TRUSTED_ORIGINS=${CSRF_TRUSTED_ORIGINS}
- DATABASE_URL=${DATABASE_URL}
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND}
- AWS_STORAGE_BUCKET_NAME=${AWS_STORAGE_BUCKET_NAME}
- AWS_S3_ENDPOINT_URL=${AWS_S3_ENDPOINT_URL}
- AWS_S3_REGION_NAME=${AWS_S3_REGION_NAME}
- AWS_S3_CUSTOM_DOMAIN=${AWS_S3_CUSTOM_DOMAIN}
- AWS_S3_ADDRESSING_STYLE=${AWS_S3_ADDRESSING_STYLE}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- OPENAI_API_KEY=${OPENAI_API_KEY}
restart: unless-stopped
networks:
- default
- dokploy-network
healthcheck:
# ALLOWED_HOSTS includes localhost so this in-container probe passes
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
worker:
build: .
command: uv run celery -A exiftree worker -l info --concurrency 2
environment:
- DEBUG=${DEBUG}
- SECRET_KEY=${SECRET_KEY}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
- DATABASE_URL=${DATABASE_URL}
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND}
- AWS_STORAGE_BUCKET_NAME=${AWS_STORAGE_BUCKET_NAME}
- AWS_S3_ENDPOINT_URL=${AWS_S3_ENDPOINT_URL}
- AWS_S3_REGION_NAME=${AWS_S3_REGION_NAME}
- AWS_S3_CUSTOM_DOMAIN=${AWS_S3_CUSTOM_DOMAIN}
- AWS_S3_ADDRESSING_STYLE=${AWS_S3_ADDRESSING_STYLE}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- OPENAI_API_KEY=${OPENAI_API_KEY}
restart: unless-stopped
networks:
- default
- dokploy-network
networks:
# Dokploy's shared network — needed to reach the exiftree-db postgres
# (a Swarm service) and for Traefik to route to web.
dokploy-network:
external: true