Files
factoryOps-v2/docker-compose.prod.yml
Johngreen 4c42f7aff8
All checks were successful
Deploy to Production / deploy (push) Successful in 46s
ops: change postgres external port from 5433 to 8200
2026-02-10 17:43:46 +09:00

74 lines
1.8 KiB
YAML

version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: factoryops-v2-db
restart: unless-stopped
environment:
POSTGRES_USER: factoryops
POSTGRES_PASSWORD: factoryops
POSTGRES_DB: factoryops_v2
ports:
- "8200:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U factoryops"]
interval: 10s
timeout: 5s
retries: 5
factoryops-api:
build:
context: .
dockerfile: Containerfile.backend
container_name: factoryops-v2-api
restart: unless-stopped
ports:
- "8100:8000"
environment:
- PYTHONPATH=/app
- PYTHONUNBUFFERED=1
- DATABASE_URL=postgresql+asyncpg://factoryops:factoryops@postgres:5432/factoryops_v2
- JWT_SECRET_KEY=${JWT_SECRET_KEY:-factoryops-v2-prod-secret}
- CORS_ORIGINS=https://factoryops.vexplor.com
- SKIP_CREATE_ALL=true
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
factoryops-dashboard:
build:
context: .
dockerfile: Containerfile.frontend
args:
NEXT_PUBLIC_API_URL: https://api.factoryops.vexplor.com
container_name: factoryops-v2-dashboard
restart: unless-stopped
ports:
- "4000:4000"
environment:
- NODE_ENV=production
depends_on:
- factoryops-api
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:4000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
postgres_data:
networks:
default:
name: factoryops-v2-network