- Apache reverse proxy config (replaces nginx — server already runs Apache) - Next.js basePath set to /amazon-transcreation for subpath deployment - Frontend on port 3050 (3000 taken), backend on 8040 - WebSocket URL auto-detects protocol from page location - Deploy script handles Apache config injection into existing vhost - All Docker ports bound to 127.0.0.1 (Apache handles external access) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
83 lines
1.8 KiB
YAML
83 lines
1.8 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER:-transcreation}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-transcreation}
|
|
POSTGRES_DB: ${DB_NAME:-transcreation}
|
|
ports:
|
|
- "127.0.0.1:5492:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-transcreation}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "127.0.0.1:6389:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
ports:
|
|
- "127.0.0.1:8040:8000"
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ./storage:/storage
|
|
- ./seed:/app/seed
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4
|
|
|
|
celery_worker:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ./storage:/storage
|
|
- ./seed:/app/seed
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
command: celery -A app.tasks.celery_app worker --loglevel=info --concurrency=4
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- NEXT_PUBLIC_API_URL=/amazon-transcreation
|
|
- NEXT_PUBLIC_WS_URL=
|
|
- NEXT_PUBLIC_BASE_PATH=/amazon-transcreation
|
|
restart: unless-stopped
|
|
ports:
|
|
- "127.0.0.1:3050:3000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
depends_on:
|
|
- backend
|
|
|
|
volumes:
|
|
pgdata:
|