Files
offerpai_python_ai/docker-compose.yml
T
2026-05-21 18:35:25 +08:00

69 lines
1.4 KiB
YAML

services:
nginx:
image: nginx:alpine
container_name: offerpie-ai-nginx
restart: unless-stopped
ports:
- "10502:80"
depends_on:
- blue
- green
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
deploy:
resources:
limits:
memory: 256M
cpus: '1'
blue:
build: .
container_name: offerpie-ai-blue
restart: unless-stopped
expose:
- "8000"
environment:
- APP_VERSION=blue
- ENV=pro
- TZ=Asia/Shanghai
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
volumes:
- /logs/offerpie-ai:/app/app/logs
deploy:
resources:
limits:
memory: 2G
cpus: '2'
green:
build: .
container_name: offerpie-ai-green
restart: unless-stopped
expose:
- "8000"
environment:
- APP_VERSION=green
- ENV=pro
- TZ=Asia/Shanghai
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
volumes:
- /logs/offerpie-ai:/app/app/logs
deploy:
resources:
limits:
memory: 2G
cpus: '2'