PDF-accessibility-saas/docker-compose.prod.yml

26 lines
763 B
YAML

# Production Docker Compose — PostgreSQL only
# Apache/Nginx on host serves PHP + frontend files natively
# PDF processing handled by Cloud Run (no local worker)
# PostgreSQL on 1221 to avoid host conflicts
services:
postgres:
image: postgres:16-alpine
ports:
- "127.0.0.1:1221: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:
pg-data: