polishing for prod testing.

This commit is contained in:
Bryan Van Deusen
2026-01-24 23:38:09 -05:00
parent 058901cd05
commit 61e9336eef
4 changed files with 334 additions and 142 deletions
+79 -21
View File
@@ -1,35 +1,93 @@
# Development overrides - use with: docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
# 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:
context: ./backend
dockerfile: Dockerfile.dev
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}
- DEFAULT_CHECK_INTERVAL=${DEFAULT_CHECK_INTERVAL:-3600}
- LOG_LEVEL=DEBUG
- DEBUG=true
volumes:
- ./backend/app:/app/app:ro
- downloads:/data/downloads
- config:/data/config
- cookies:/data/cookies
environment:
- DEBUG=true
- LOG_LEVEL=DEBUG
- ${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:
context: ./backend
dockerfile: Dockerfile.dev
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}
- DEFAULT_CHECK_INTERVAL=${DEFAULT_CHECK_INTERVAL:-3600}
- LOG_LEVEL=DEBUG
- DEBUG=true
volumes:
- ./backend/app:/app/app:ro
- downloads:/data/downloads
- config:/data/config
- cookies:/data/cookies
environment:
- DEBUG=true
- LOG_LEVEL=DEBUG
- ${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:
- "5432:5432"
- "${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:
- "6379:6379"
- "${REDIS_PORT:-6379}:6379"
restart: unless-stopped
volumes:
postgres_data:
downloads:
config: