polish downloads view

This commit is contained in:
Bryan Van Deusen
2026-01-29 19:42:14 -05:00
parent fcccfb24ee
commit c1fe8148b8
4 changed files with 187 additions and 25 deletions
+26 -5
View File
@@ -8,6 +8,7 @@
# - Volume mounts for live code reloading
# - Debug logging enabled
# - Database and Redis ports exposed for local tools
# - Separate scheduler and worker services (matches production)
services:
# Combined backend API + frontend static files
@@ -18,7 +19,7 @@ services:
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
- REDIS_URL=redis://${REDIS_HOST:-redis}:${REDIS_PORT:-6379}/${REDIS_DB:-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}
@@ -35,14 +36,14 @@ services:
condition: service_started
restart: unless-stopped
# Celery worker for background tasks
celery:
# Celery download workers - only process download tasks (heavy work)
worker:
build: .
command: celery -A app.tasks.celery_app worker -B --loglevel=debug
command: celery -A app.tasks.celery_app worker --queues=downloads --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
- REDIS_URL=redis://${REDIS_HOST:-redis}:${REDIS_PORT:-6379}/${REDIS_DB:-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}
@@ -59,6 +60,26 @@ services:
condition: service_started
restart: unless-stopped
# Celery scheduler - runs beat + handles lightweight scheduling tasks
scheduler:
build: .
command: celery -A app.tasks.celery_app worker --queues=scheduling --beat --loglevel=debug --concurrency=1
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}/${REDIS_DB:-0}
- SECRET_KEY=${SECRET_KEY:-dev-secret-key-not-for-production}
- LOG_LEVEL=DEBUG
- DEBUG=true
volumes:
- ./backend/app:/app/app:ro
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
restart: unless-stopped
# PostgreSQL database
db:
image: postgres:15-alpine