salary-benchmark/deploy/docker-compose.prod.yml
DJP e9b9c66423 Add login (JWT + local admin user) and deploy script for optical-dev
- Backend: users table + admin seed (004), /api/auth endpoints, JWT auth
  dep gating benchmarks + research routes
- Frontend: AuthContext, LoginPage, ProtectedRoute, subpath-aware via
  VITE_BASE / import.meta.env.BASE_URL so same build works at /opt/
- deploy/: Dockerfile.prod, docker-compose.prod.yml, Apache vhost
  fragment template, and idempotent deploy.sh (port scan, rsync, env
  generation, Apache Include + reload)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 19:34:15 -04:00

32 lines
759 B
YAML

services:
db:
image: postgres:16-alpine
container_name: salary-benchmark-db
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 5s
retries: 10
app:
build:
context: ..
dockerfile: deploy/Dockerfile.prod
container_name: salary-benchmark-app
restart: unless-stopped
env_file: .env.prod
depends_on:
db:
condition: service_healthy
ports:
# Bind to loopback only — Apache fronts it
- "127.0.0.1:${APP_PORT}:8000"
volumes:
pgdata: