pdf-accessibility/docker-compose.prod.yml
Vadym Samoilenko 112719b2c5 Add Docker stack, frontend redesign, and visual page inspector fix
- Redesigned frontend with Outfit/Figtree typography, coral accent palette,
  noise texture, glassmorphism header, and staggered animations
- Split monolithic index.html into modular JS (app, api, upload, batch,
  results, page-viewer, utils) and extracted CSS
- Fixed worker.py to generate page images for Visual Page Inspector
- Added Docker Compose stack (web, worker, redis, postgres)
- Added batch upload, HTML report export, rate limiting, and Redis queue
- Extended test suite with checker, remediation, worker, and DB tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:12:44 +00:00

66 lines
1.7 KiB
YAML

# Production Docker Compose — worker + Redis + PostgreSQL only
# Apache on host serves PHP + frontend files natively
# Redis/PostgreSQL ports exposed to localhost for api.php access
services:
worker:
build:
context: .
dockerfile: Dockerfile.worker
volumes:
- ${WEB_DIR:-/var/www/html/pdf-accessibility}/uploads:/app/uploads
- ${WEB_DIR:-/var/www/html/pdf-accessibility}/results:/app/results
- ./logs:/app/logs
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=${DB_NAME:-pdf_checker}
- DB_USER=${DB_USER:-pdf_checker}
- DB_PASSWORD=${DB_PASSWORD:-dev_password}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- GOOGLE_API_KEY=${GOOGLE_API_KEY:-}
deploy:
replicas: ${WORKER_COUNT:-2}
restart: unless-stopped
redis:
image: redis:7-alpine
ports:
- "127.0.0.1:6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
restart: unless-stopped
postgres:
image: postgres:16-alpine
ports:
- "127.0.0.1:5432:5432"
volumes:
- pg-data:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
POSTGRES_DB: ${DB_NAME:-pdf_checker}
POSTGRES_USER: ${DB_USER:-pdf_checker}
POSTGRES_PASSWORD: ${DB_PASSWORD:-dev_password}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-pdf_checker}"]
interval: 10s
timeout: 3s
retries: 3
restart: unless-stopped
volumes:
redis-data:
pg-data: