Files
audit-platform/deploy/docker-compose.yml
guwangtu 4b5b119c18
CI / check (push) Waiting to run
feat: add HTTPS subdomains, shared cookie, templates and wiki docs
Signed-off-by: 南通一次元科技有限公司 <guwangtu@icimeta.com>
2026-12-06 13:29:25 +00:00

102 lines
3.3 KiB
YAML

# 医院审计科综合管理系统 - Docker Compose 编排
# 四个服务共用同一镜像,代码与数据统一放在 ./app 目录下挂载到容器的 /app
#
# 端口:门户 8080 / 审计 8000 / 风险 8001 / 合同 8090
# 启动:docker compose up -d --build
# 停止:docker compose down
# 日志:docker compose logs -f <audit|risk|contract|portal>
x-common: &common
image: hospital-audit-suite:1.0
restart: unless-stopped
volumes:
- ./app:/app
environment:
TZ: Asia/Shanghai
# 登录账号密码(在 .env 文件中配置)
AUTH_USER: ${AUTH_USER:?请在 .env 中设置 AUTH_USER}
AUTH_PASSWORD: ${AUTH_PASSWORD:?请在 .env 中设置 AUTH_PASSWORD}
# Cookie 会话签名密钥(四个服务必须一致)
SESSION_SECRET: ${SESSION_SECRET:?请在 .env 中设置 SESSION_SECRET}
PORTAL_LOGIN_URL: ${PORTAL_LOGIN_URL:-}
PUBLIC_DOMAIN: ${PUBLIC_DOMAIN:-}
services:
# ===== 审计项目管理平台 :8000 =====
audit:
<<: *common
build:
context: .
dockerfile: Dockerfile
container_name: audit-suite-audit
working_dir: /app/审计项目管理平台
command: ["python", "start_audit_server.py"]
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request;urllib.request.urlopen('http://127.0.0.1:8000/api/health', timeout=3)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
# ===== 风险管理项目 :8001 =====
risk:
<<: *common
container_name: audit-suite-risk
working_dir: /app/风险管理项目
command: ["python", "main.py"]
ports:
- "8001:8001"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request;urllib.request.urlopen('http://127.0.0.1:8001/api/health', timeout=3)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
# ===== 合同审核管理平台 :8090 =====
contract:
<<: *common
container_name: audit-suite-contract
working_dir: /app/合同审核管理平台
command: ["python", "portal_server.py"]
ports:
- "8090:8090"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request;urllib.request.urlopen('http://127.0.0.1:8090/api/health', timeout=3)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
# ===== 综合管理平台(门户) :8080 =====
portal:
<<: *common
container_name: audit-suite-portal
working_dir: /app/综合管理平台
command: ["python", "portal_server.py"]
ports:
- "8080:8080"
environment:
TZ: Asia/Shanghai
AUTH_USER: ${AUTH_USER:?请在 .env 中设置 AUTH_USER}
AUTH_PASSWORD: ${AUTH_PASSWORD:?请在 .env 中设置 AUTH_PASSWORD}
SESSION_SECRET: ${SESSION_SECRET:?请在 .env 中设置 SESSION_SECRET}
PORTAL_LOGIN_URL: ${PORTAL_LOGIN_URL:-}
PUBLIC_DOMAIN: ${PUBLIC_DOMAIN:-}
# 容器内用服务名互相访问,门户的健康检查依赖这三个地址
AUDIT_URL: http://audit:8000
RISK_URL: http://risk:8001
CONTRACT_URL: http://contract:8090
depends_on:
- audit
- risk
- contract
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request;urllib.request.urlopen('http://127.0.0.1:8080/api/health', timeout=3)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s