For deployment to optical-dev.oliver.solutions under /hp-content-agent/.
- deploy/deploy.sh idempotent bootstrap: secrets check, free-port
picker, build+up, migrations+seed, Apache Include
install + reload, UFW allow
- deploy/apache/*.conf.template reverse-proxy snippet (API before SPA)
- deploy/README.md runbook for first-time + re-deploy
- docker-compose.prod.yml prod overrides: frontend target=prod (nginx),
uvicorn --workers 2, drops dev volume mounts
- docker-compose.yml pinned project name (required on the shared
server per CLAUDE.md)
- frontend/nginx.conf SPA fallback + asset caching, health endpoint
- frontend/Dockerfile VITE_BASE_PATH build arg for subpath deploys
- frontend/vite.config.ts reads VITE_BASE_PATH
Public: https://optical-dev.oliver.solutions/hp-content-agent/
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
83 lines
1.9 KiB
YAML
83 lines
1.9 KiB
YAML
# Pinned project name — required per CLAUDE.md: the shared dev server otherwise
|
|
# collapses compose projects by parent dir, which lets deploys evict each other.
|
|
name: hp-studios-ai-content-agent
|
|
|
|
services:
|
|
postgres:
|
|
image: pgvector/pgvector:pg16
|
|
env_file: .env
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
ports:
|
|
- "${POSTGRES_HOST_PORT:-55432}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./backend/db-init:/docker-entrypoint-initdb.d:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "${REDIS_HOST_PORT:-56379}:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
api:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
env_file: .env
|
|
ports:
|
|
- "${API_HOST_PORT:-8008}:8000"
|
|
volumes:
|
|
- ./backend:/app
|
|
- ./data:/app/data
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
worker:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
command: rq worker default
|
|
env_file: .env
|
|
volumes:
|
|
- ./backend:/app
|
|
- ./data:/app/data
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
target: dev
|
|
env_file: .env
|
|
ports:
|
|
- "${FRONTEND_HOST_PORT:-5178}:5173"
|
|
volumes:
|
|
- ./frontend/src:/app/src
|
|
- ./frontend/public:/app/public
|
|
depends_on:
|
|
- api
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|