Files
offerpai_python_ai/docker-compose.yml
T
2026-05-27 15:07:23 +08:00

68 lines
1.4 KiB
YAML

services:
nginx:
image: nginx:alpine
container_name: offerpie-ai-nginx
restart: unless-stopped
ports:
- "10502:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
deploy:
resources:
limits:
memory: 256M
cpus: '1'
blue:
image: offerpie-ai:latest
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:
image: offerpie-ai:latest
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'