把已在跑的 JNPF v7 低代码平台部署纳入版本管理, 供同事各自建应用测试。
入库内容 (43 文件 / 364K):
- AGENTS.md 部署全量文档 (架构 / 踩坑 / 排查速查 / 多租户 SSO)
- jnpf-k8s/k8s/ 9 个 K8s 清单 (infra/web/admin/satellites/tenant/kkfile)
- jnpf-k8s/scripts/ 01-artifacts 02-seed-db 03-deploy 04-verify
- jnpf-k8s/docker-optional/ 早期「每服务一镜像」方案, 已弃用但留作参考
- other/*/config/ compose 时代的语义配置参考
- docker-compose.yml / Dockerfile (根, compose 时代)
不入库 (见 .gitignore):
- jnpf-k8s/build/ 1.1G 5 个 fat jar + 128M 灌库 SQL + 前端 dist, 可由
scripts/01-artifacts.sh 重新组装
- other/*/ jar / datav 前端静态 / 运行日志
- boot/ 独立 git 仓库 (远端 ssw/boot), 嵌套不入库
硬约束 (AGENTS.md §7): 不重打镜像, 存储走 PVC, 容器 runAsUser=10106,
对外只用 NodePort (无 IngressClass), nginx 统一 listen 8080。
Co-Authored-By: Claude <[email protected]>
297 lines
10 KiB
YAML
297 lines
10 KiB
YAML
# =============================================================================
|
||
# JNPF + AIBridge + Claude Code 一键启动
|
||
# =============================================================================
|
||
# 启动:
|
||
# docker compose up -d
|
||
#
|
||
# 进入容器:
|
||
# docker compose exec jnpf bash
|
||
#
|
||
# 进入后手动启动服务:
|
||
# java -jar /app/boot/jnpf-admin/target/jnpf-admin-6.2.0-RELEASE.jar --server.port=30000
|
||
# claude
|
||
# =============================================================================
|
||
|
||
services:
|
||
|
||
# ---------------------------------------------------------------------------
|
||
# 基础设施层
|
||
# ---------------------------------------------------------------------------
|
||
|
||
|
||
redis:
|
||
image: crpi-yscq976uwza88qap.cn-shenzhen.personal.cr.aliyuncs.com/ssw188/redis:latest
|
||
container_name: jnpf-redis
|
||
command: redis-server --requirepass 123456
|
||
ports:
|
||
- "16379:6379"
|
||
networks:
|
||
- jnpf-net
|
||
restart: unless-stopped
|
||
|
||
postgres:
|
||
image: crpi-yscq976uwza88qap.cn-shenzhen.personal.cr.aliyuncs.com/ssw188/postgres:16-alpine
|
||
container_name: jnpf-postgres
|
||
environment:
|
||
POSTGRES_DB: postgres
|
||
POSTGRES_USER: dacli
|
||
POSTGRES_PASSWORD: dacli123
|
||
volumes:
|
||
- ./persist/postgres:/var/lib/postgresql/data
|
||
ports:
|
||
- "15432:5432"
|
||
networks:
|
||
- jnpf-net
|
||
restart: unless-stopped
|
||
healthcheck:
|
||
test: ["CMD-SHELL", "pg_isready -U dacli -d codegraph"]
|
||
interval: 10s
|
||
timeout: 5s
|
||
retries: 5
|
||
|
||
# xxl:
|
||
# image: crpi-yscq976uwza88qap.cn-shenzhen.personal.cr.aliyuncs.com/ssw188/liberica-openjre-rocky:21
|
||
# container_name: jnpf-xxl
|
||
# depends_on:
|
||
# postgres:
|
||
# condition: service_healthy
|
||
# redis:
|
||
# condition: service_started
|
||
# ports:
|
||
# - "30020:30020"
|
||
# volumes:
|
||
# - ./persist/xxl:/usr/ssw/xxl
|
||
# - ./log:/usr/ssw/log
|
||
# command: ["/bin/sh","-c","cd /usr/ssw/xxl; java -Dfile.encoding=utf8 -Djava.security.egd=file:/dev/./urandom -jar xxl-job-admin-3.5.0-RELEASE.jar"]
|
||
# networks:
|
||
# - jnpf-net
|
||
# restart: unless-stopped
|
||
|
||
# workflow:
|
||
# image: crpi-yscq976uwza88qap.cn-shenzhen.personal.cr.aliyuncs.com/ssw188/liberica-openjre-rocky:21
|
||
# container_name: jnpf-workflow
|
||
# depends_on:
|
||
# postgres:
|
||
# condition: service_healthy
|
||
# redis:
|
||
# condition: service_started
|
||
# ports:
|
||
# - "31000:31000"
|
||
# volumes:
|
||
# - ./persist/wf:/usr/ssw/wf
|
||
# - ./log:/usr/ssw/log
|
||
# command: ["/bin/sh","-c","cd /usr/ssw/wf; java -Dfile.encoding=utf8 -Djava.security.egd=file:/dev/./urandom --add-opens java.base/java.lang=ALL-UNNAMED -XX:+DisableAttachMechanism -jar jnpf-workflow-admin-1.0.0-RELEASE.jar"]
|
||
# networks:
|
||
# - jnpf-net
|
||
# restart: unless-stopped
|
||
|
||
# ---------------------------------------------------------------------------
|
||
# Git 服务(Gitea)
|
||
# ---------------------------------------------------------------------------
|
||
gitea:
|
||
image: crpi-yscq976uwza88qap.cn-shenzhen.personal.cr.aliyuncs.com/ssw188/gitea:latest
|
||
container_name: jnpf-gitea
|
||
depends_on:
|
||
postgres:
|
||
condition: service_healthy
|
||
ports:
|
||
- "13300:3000" # Web UI
|
||
- "13301:22" # SSH 克隆地址
|
||
volumes:
|
||
# 数据持久化 - 独立目录,AI 无法访问业务代码
|
||
- ./persist/gits:/data
|
||
# 时区配置
|
||
- /etc/localtime:/etc/localtime:ro
|
||
environment:
|
||
- USER_UID=1000
|
||
- USER_GID=1000
|
||
- GITEA__database__DB_TYPE=postgres
|
||
- GITEA__database__HOST=postgres:5432
|
||
- GITEA__database__NAME=gitea
|
||
- GITEA__database__USER=dacli
|
||
- GITEA__database__PASSWD=dacli123
|
||
- GITEA__security__INSTALL_LOCK=true
|
||
- GITEA__server__DOMAIN=localhost
|
||
- GITEA__server__SSH_DOMAIN=localhost
|
||
- GITEA__server__HTTP_PORT=3000
|
||
- GITEA__server__SSH_PORT=22
|
||
- GITEA__server__ROOT_URL=http://localhost:13300/
|
||
networks:
|
||
- jnpf-net
|
||
restart: unless-stopped
|
||
healthcheck:
|
||
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
|
||
interval: 15s
|
||
timeout: 5s
|
||
retries: 5
|
||
|
||
# ---------------------------------------------------------------------------
|
||
# Nginx 前端
|
||
# ---------------------------------------------------------------------------
|
||
|
||
# nginx:
|
||
# image: crpi-yscq976uwza88qap.cn-shenzhen.personal.cr.aliyuncs.com/ssw188/nginx:latest
|
||
# container_name: jnpf-nginx
|
||
# depends_on:
|
||
# - jnpf
|
||
# ports:
|
||
# - "13880:80"
|
||
# - "13881:81"
|
||
# volumes:
|
||
# - ./web/apps/jnpf-web-apps-main/dist:/usr/ssw/dist
|
||
# - ./web/apps/jnpf-web-apps-main/public:/usr/ssw/public
|
||
# - ./persist/resources:/usr/ssw/resources
|
||
# - ./persist/datav:/usr/ssw/datav
|
||
# - ./persist/nginx.conf:/etc/nginx/conf.d/default.conf
|
||
# networks:
|
||
# - jnpf-net
|
||
# restart: unless-stopped
|
||
# healthcheck:
|
||
# test: ["CMD", "nginx", "-t"]
|
||
# interval: 10s
|
||
# timeout: 5s
|
||
# retries: 3
|
||
|
||
# # ---------------------------------------------------------------------------
|
||
# # JNPF 主服务(后端 + Claude Code)
|
||
# # ---------------------------------------------------------------------------
|
||
|
||
# jnpf:
|
||
# image: crpi-yscq976uwza88qap.cn-shenzhen.personal.cr.aliyuncs.com/ssw188/cc:latest
|
||
# # build:
|
||
# # context: .
|
||
# # dockerfile: Dockerfile
|
||
# container_name: jnpf-all-in-one
|
||
# depends_on:
|
||
# redis:
|
||
# condition: service_started
|
||
# postgres:
|
||
# condition: service_healthy
|
||
# xxl:
|
||
# condition: service_started
|
||
# workflow:
|
||
# condition: service_started
|
||
# ports:
|
||
# # - "30000:30000" # JNPF 后端 API端口
|
||
# - "13000:3000" # vite端口
|
||
# - "13001:3001" # cloudcli端口
|
||
# - "3002:3002" # od web
|
||
# - "13088:88" # cloudcli端口
|
||
# # - "5005:5005" # JVM 调试
|
||
# volumes:
|
||
|
||
# # JNPF官方包 只读
|
||
# - ./jnpf:/home/ubuntu/ccWorkDir/jnpf:ro
|
||
|
||
# - ./persist/resources:/home/ubuntu/ccWorkDir/boot/resources
|
||
# - ./persist/report:/home/ubuntu/ccWorkDir/boot/report
|
||
|
||
# #映射容器配置信息
|
||
# - ./docker-compose.yml:/home/ubuntu/ccWorkDir/docker/docker-compose.yml:ro
|
||
# - ./persist/nginx.conf:/home/ubuntu/ccWorkDir/docker/nginx.conf:ro
|
||
# - ./Dockerfile:/home/ubuntu/ccWorkDir/docker/Dockerfile:ro
|
||
|
||
# # 业务代码目录(映射到 /ccWorkDir/)
|
||
# - ./dacli:/home/ubuntu/ccWorkDir/dacli
|
||
# - ./boot:/home/ubuntu/ccWorkDir/boot
|
||
# - ./docs:/home/ubuntu/ccWorkDir/docs
|
||
# - ./log:/home/ubuntu/ccWorkDir/log
|
||
|
||
# - ./web:/home/ubuntu/ccWorkDir/web
|
||
# - ./uniapp:/home/ubuntu/ccWorkDir/uniapp
|
||
|
||
|
||
# # Claude Code 环境持久化
|
||
# - ./persist/claude:/home/ubuntu/.claude
|
||
# - ./persist/claude.json:/home/ubuntu/.claude.json
|
||
|
||
# # 隐藏目录(项目.claude配置)
|
||
# - ./.claude:/home/ubuntu/ccWorkDir/.claude
|
||
|
||
# #playwright 持久化
|
||
# - ./persist/ms-playwright:/home/ubuntu/.cache/ms-playwright
|
||
# # Python 环境持久化
|
||
# - ./persist/pip:/usr/local/lib/python3.12/dist-packages
|
||
|
||
# # node / pnpm / pip 下载缓存持久化(对应 Dockerfile 中的缓存路径)
|
||
# - ./persist/npm-cache:/home/ubuntu/.cache/npm
|
||
# - ./persist/pnpm:/home/ubuntu/.cache/pnpm
|
||
# - ./persist/pnpm-store:/home/ubuntu/.cache/pnpm-store
|
||
# - ./persist/pip-cache:/home/ubuntu/.cache/pip
|
||
|
||
# # Maven 环境持久化
|
||
# - /root/.m2:/root/.m2
|
||
|
||
# # Cloudcli
|
||
# - ./persist/cloudcli.db:/home/ubuntu/.cloudcli/auth.db
|
||
|
||
# environment:
|
||
# LANG: C.utf8
|
||
# LC_ALL: C.utf8
|
||
# #DISABLE_AUTOUPDATER: 1 #禁止自动更新
|
||
# HOME: /home/ubuntu
|
||
# ccWorkDir: /home/ubuntu/ccWorkDir
|
||
# working_dir: /home/ubuntu/ccWorkDir
|
||
# entrypoint: ["/bin/bash", "-c"]
|
||
# #command: ["java -jar boot/jnpf-admin/target/jnpf-admin-*.jar --spring.profiles.active=dev ; tail -f /dev/null"]
|
||
# command: ["bash /home/ubuntu/ccWorkDir/.claude/hooks/init.sh && cloudcli &> /tmp/cloudcli.log & java -Dfile.encoding=utf8 -Djava.security.egd=file:/dev/./urandom -jar boot/ssw-admin/target/ssw-admin-*.jar --spring.profiles.active=dev ; tail -f /dev/null"]
|
||
# networks:
|
||
# - jnpf-net
|
||
# restart: unless-stopped
|
||
# tty: true
|
||
# stdin_open: true
|
||
|
||
# ontology:
|
||
# image: alpine:3.20
|
||
# container_name: shangshu-ontology
|
||
# depends_on:
|
||
# postgres:
|
||
# condition: service_healthy
|
||
# ports:
|
||
# - "8081:8081"
|
||
# volumes:
|
||
# # 已编译的 Linux 静态二进制 (只读挂载)
|
||
# - /Users/xs/Desktop/know/ssw-ontology/bin/server-linux:/app/server:ro
|
||
# # 知识文件根目录 (读写, 支持上传提取)
|
||
# - /Users/xs/Desktop/know/ssw-ontology/archive:/app/archive
|
||
# environment:
|
||
# DATABASE_URL: postgres://dacli:dacli123@postgres:5432/shangshu?sslmode=disable
|
||
# HTTP_PORT: "8081"
|
||
# ARCHIVE_DIR: /app/archive
|
||
# SEED_ON_START: "true"
|
||
# ALLOW_CORS: "true"
|
||
# AI_ENABLED: "true"
|
||
# AI_BASE_URL: https://api.minimaxi.com/anthropic
|
||
# AI_KEY: sk-cp-pI_Yq-u5HrclWaesyc1R98_yJfUC6c_Mwv7711VQ_p7NeFof96qSLJNlzxsNz0ahi6-LxunFQ5mqkW9exBsyxX-JX9egz9P84edge8j-WMTAXaJVFxEVYRY
|
||
# AI_MODEL: MiniMax-M3
|
||
# labels:
|
||
# - autoheal=true
|
||
# networks:
|
||
# - jnpf-net
|
||
# restart: unless-stopped
|
||
# command: ["/bin/sh", "-c", "apk add --no-cache ca-certificates >/dev/null 2>&1; exec /app/server"]
|
||
# healthcheck:
|
||
# test: ["CMD-SHELL", "wget -q -O /dev/null http://localhost:8081/api/v1/connector/object-types || exit 1"]
|
||
# interval: 30s
|
||
# timeout: 10s
|
||
# retries: 3
|
||
# start_period: 60s
|
||
|
||
# autoheal:
|
||
# image: willfarrell/autoheal:latest
|
||
# environment:
|
||
# - AUTOHEAL_CONTAINER_LABEL=autoheal
|
||
# volumes:
|
||
# - /var/run/docker.sock:/var/run/docker.sock
|
||
# networks:
|
||
# - jnpf-net
|
||
# restart: unless-stopped
|
||
|
||
# ---------------------------------------------------------------------------
|
||
# 网络与存储
|
||
# ---------------------------------------------------------------------------
|
||
|
||
networks:
|
||
jnpf-net:
|
||
driver: bridge
|