Files
zhixing-system/docker-compose.prod.yml
T
yuxuanhui 3aad06d44a
Runner Smoke Test / runner-smoke-test (push) Successful in 1s
feat: 添加生产环境的 Docker Compose 配置
2026-08-04 13:21:46 +08:00

39 lines
838 B
YAML

name: ${COMPOSE_PROJECT_NAME:-zhixing-system}
services:
server:
build:
context: ./zhixing-server
target: production
restart: unless-stopped
environment:
ZHIXING_APP_ENV: production
ZHIXING_LOG_LEVEL: ${ZHIXING_LOG_LEVEL:-INFO}
init: true
expose:
- "8000"
healthcheck:
test:
- CMD
- python
- -c
- "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/healthz')"
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
web:
build:
context: ./zhixing-web
target: production
restart: unless-stopped
depends_on:
server:
condition: service_healthy
environment:
API_UPSTREAM: http://server:8000
init: true
ports:
- "${ZHIXING_WEB_PORT:-8111}:80"