为减少仓库噪声和重复规则,整理当前开发入口并移除已废弃资料。 - 精简根 AGENTS,补充四个应用规则与 README,统一规范入口 - 归整部署文件、SOP 原稿和参考资源,修正迁移后的脚本路径 - 取消虚拟环境、工具状态、业务导出及备份的跟踪,本机所需原件保留 - 移除停用的 graphify 配置、脚本与产物 - 删除历史业务文档、执行计划、OpenSpec 业务变更和移动 UI 原型 - 清理失效引用,历史细胞产品导入改为必须显式指定 --file 验证:git diff --cached --check、OpenSpec 严格校验、导入参数隔离检查 3/3 通过; 迁移文件完整性和现行链接已核对。未执行部署、业务数据导入或服务启停。
146 lines
3.9 KiB
YAML
146 lines
3.9 KiB
YAML
# 中科兴皖 Docker Compose 部署(甲方交付版:使用预构建镜像,不含源码)
|
||
#
|
||
# 启动(在 deploy/docker 目录):
|
||
# docker load -i ../../images/zkxw-app-images.tar
|
||
# cp .env.example .env # 修改密码与镜像 tag
|
||
# docker compose up -d
|
||
#
|
||
# 发版方本地从源码构建镜像:见 scripts/build-docker-images.sh
|
||
# Profile 说明见 README.md
|
||
|
||
name: zkxw
|
||
|
||
services:
|
||
mysql:
|
||
profiles: [full]
|
||
image: mysql:5.7.36
|
||
# MySQL 5.7 无 arm64 镜像;Mac(M 芯片) 与甲方 x86 云主机均用 amd64(Mac 上由 Docker 模拟)
|
||
platform: linux/amd64
|
||
restart: unless-stopped
|
||
command: >
|
||
--character-set-server=utf8mb4
|
||
--collation-server=utf8mb4_unicode_ci
|
||
--explicit_defaults_for_timestamp=1
|
||
environment:
|
||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||
MYSQL_DATABASE: zkxw
|
||
TZ: Asia/Shanghai
|
||
volumes:
|
||
- mysql_data:/var/lib/mysql
|
||
- ./mysql/init/01-init-db.sql:/docker-entrypoint-initdb.d/01-init-db.sql:ro
|
||
- ../../docs/sql/zkxw.sql:/docker-entrypoint-initdb.d/02-zkxw.sql:ro
|
||
healthcheck:
|
||
test: ['CMD', 'mysqladmin', 'ping', '-h', '127.0.0.1', '-p${MYSQL_ROOT_PASSWORD}']
|
||
interval: 10s
|
||
timeout: 5s
|
||
retries: 30
|
||
start_period: 60s
|
||
|
||
redis:
|
||
profiles: [full]
|
||
image: redis:7-alpine
|
||
platform: linux/amd64
|
||
restart: unless-stopped
|
||
command: redis-server --appendonly yes
|
||
volumes:
|
||
- redis_data:/data
|
||
healthcheck:
|
||
test: ['CMD', 'redis-cli', 'ping']
|
||
interval: 10s
|
||
timeout: 3s
|
||
retries: 10
|
||
|
||
minio:
|
||
profiles: [full, storage]
|
||
image: minio/minio:latest
|
||
platform: linux/amd64
|
||
restart: unless-stopped
|
||
command: server /data --console-address ":9001"
|
||
environment:
|
||
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
|
||
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
|
||
TZ: Asia/Shanghai
|
||
volumes:
|
||
- minio_data:/data
|
||
|
||
minio-init:
|
||
profiles: [full, storage]
|
||
image: minio/mc:latest
|
||
platform: linux/amd64
|
||
depends_on:
|
||
minio:
|
||
condition: service_started
|
||
entrypoint: >
|
||
/bin/sh -c "
|
||
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
|
||
mc alias set local http://minio:9000 $${MINIO_ACCESS_KEY} $${MINIO_SECRET_KEY} && break
|
||
sleep 2
|
||
done &&
|
||
mc mb --ignore-existing local/$${MINIO_BUCKET} &&
|
||
mc anonymous set download local/$${MINIO_BUCKET} &&
|
||
exit 0
|
||
"
|
||
environment:
|
||
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
|
||
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
|
||
MINIO_BUCKET: ${MINIO_BUCKET}
|
||
restart: 'no'
|
||
|
||
backend:
|
||
profiles: [app, full]
|
||
image: ${ZKXW_BACKEND_IMAGE:-zkxw-backend:latest}
|
||
platform: linux/amd64
|
||
restart: unless-stopped
|
||
env_file: .env
|
||
environment:
|
||
TZ: Asia/Shanghai
|
||
depends_on:
|
||
mysql:
|
||
condition: service_healthy
|
||
required: false
|
||
redis:
|
||
condition: service_healthy
|
||
required: false
|
||
minio-init:
|
||
condition: service_completed_successfully
|
||
required: false
|
||
volumes:
|
||
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||
- backend_uploads:/app/uploads
|
||
healthcheck:
|
||
test: ['CMD', 'python', '-c', "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8111/health')"]
|
||
interval: 30s
|
||
timeout: 5s
|
||
retries: 5
|
||
start_period: 60s
|
||
|
||
web:
|
||
profiles: [app, full]
|
||
image: ${ZKXW_WEB_IMAGE:-zkxw-web:latest}
|
||
platform: linux/amd64
|
||
restart: unless-stopped
|
||
environment:
|
||
TZ: Asia/Shanghai
|
||
ports:
|
||
- '${HTTP_PORT:-8112}:80'
|
||
depends_on:
|
||
backend:
|
||
condition: service_healthy
|
||
minio:
|
||
condition: service_started
|
||
required: false
|
||
healthcheck:
|
||
test: ['CMD', 'wget', '-qO-', 'http://127.0.0.1/']
|
||
interval: 30s
|
||
timeout: 5s
|
||
retries: 5
|
||
start_period: 15s
|
||
volumes:
|
||
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
|
||
|
||
volumes:
|
||
mysql_data:
|
||
redis_data:
|
||
minio_data:
|
||
backend_uploads:
|