# 测试/正式环境部署编排(正式口令不得写入本文件)。 # 使用:复制 .env.example 为 .env 填写;TAG 指定镜像标签(默认取当前提交 sha)。 # 例:TAG=v1.0.0-rc1 docker compose -f compose.yaml up -d --build services: app: container_name: caiwuzongzhang-app image: caiwuzongzhang:${TAG:-latest} build: context: .. dockerfile: deploy/Dockerfile env_file: - .env ports: - "4173:4173" volumes: - ../data:/app/data init: true restart: unless-stopped read_only: true tmpfs: - /tmp:size=64m,mode=1777 security_opt: - no-new-privileges:true cap_drop: - ALL pids_limit: 128 mem_limit: 512m cpus: 1.0 healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:4173/', timeout=2)"] interval: 15s timeout: 3s retries: 5 start_period: 10s