# GallerySubscriber - Development Docker Compose # # This builds from source with hot-reloading and debug mode. # Usage: docker compose -f docker-compose.dev.yml up --build # # Features: # - Builds from local Dockerfile # - Volume mounts for live code reloading # - Debug logging enabled # - Database and Redis ports exposed for local tools services: # Combined backend API + frontend static files app: build: . ports: - "${PORT:-8080}:8080" environment: - TZ=${TZ:-America/New_York} - DATABASE_URL=postgresql://${DB_USER:-gdl}:${DB_PASSWORD:-devpassword}@${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-gallery_subscriber} - REDIS_URL=redis://${REDIS_HOST:-redis}:${REDIS_PORT:-6379}/0 - SECRET_KEY=${SECRET_KEY:-dev-secret-key-not-for-production} - DOWNLOAD_PARALLEL_LIMIT=${DOWNLOAD_PARALLEL_LIMIT:-3} - DOWNLOAD_RATE_LIMIT=${DOWNLOAD_RATE_LIMIT:-3.0} - LOG_LEVEL=DEBUG - DEBUG=true volumes: - ./backend/app:/app/app:ro - ${DATA_DOWNLOADS:-downloads}:/data/downloads - ${DATA_CONFIG:-config}:/data/config depends_on: db: condition: service_healthy redis: condition: service_started restart: unless-stopped # Celery worker for background tasks celery: build: . command: celery -A app.tasks.celery_app worker -B --loglevel=debug environment: - TZ=${TZ:-America/New_York} - DATABASE_URL=postgresql://${DB_USER:-gdl}:${DB_PASSWORD:-devpassword}@${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-gallery_subscriber} - REDIS_URL=redis://${REDIS_HOST:-redis}:${REDIS_PORT:-6379}/0 - SECRET_KEY=${SECRET_KEY:-dev-secret-key-not-for-production} - DOWNLOAD_PARALLEL_LIMIT=${DOWNLOAD_PARALLEL_LIMIT:-3} - DOWNLOAD_RATE_LIMIT=${DOWNLOAD_RATE_LIMIT:-3.0} - LOG_LEVEL=DEBUG - DEBUG=true volumes: - ./backend/app:/app/app:ro - ${DATA_DOWNLOADS:-downloads}:/data/downloads - ${DATA_CONFIG:-config}:/data/config depends_on: db: condition: service_healthy redis: condition: service_started restart: unless-stopped # PostgreSQL database db: image: postgres:15-alpine ports: - "${DB_PORT:-5432}:5432" environment: - TZ=${TZ:-America/New_York} - POSTGRES_USER=${DB_USER:-gdl} - POSTGRES_PASSWORD=${DB_PASSWORD:-devpassword} - POSTGRES_DB=${DB_NAME:-gallery_subscriber} volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-gdl} -d ${DB_NAME:-gallery_subscriber}"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped # Redis for Celery task queue redis: image: redis:7-alpine ports: - "${REDIS_PORT:-6379}:6379" restart: unless-stopped volumes: postgres_data: downloads: config: