feat: initialize Nuanji (Warm Notes) project
- Base platform from base.git (ERP base: auth, core, config, message, workflow, plugin) - Created erp-diary module skeleton (lib.rs, dto.rs, error.rs, event.rs, state.rs) - Integrated erp-diary into workspace and erp-server - Added DiaryModule registration in main.rs - Added DiaryState FromRef in state.rs - Diary routes mounted (empty routes, ready for implementation) - Product design spec v1.2 preserved in docs/ - Implementation plan preserved in plans/ Cargo check: OK Cargo test: OK (78+ base tests passing)
This commit is contained in:
40
docker/docker-compose.cloud.yml
Normal file
40
docker/docker-compose.cloud.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
# 云端部署配置 — 仅启动应用容器,PG/Redis 使用宿主机已安装的服务
|
||||
# 使用方式: docker compose -f docker/docker-compose.cloud.yml up -d
|
||||
#
|
||||
# 前置条件:
|
||||
# 1. 宿主机已安装 PostgreSQL 16 + Redis 7
|
||||
# 2. PostgreSQL 已创建数据库和用户
|
||||
# 3. 复制 .env.production.example 为 .env.production 并填写实际值
|
||||
# 4. OpenResty 反代配置:
|
||||
# - /api/* → http://localhost:3000
|
||||
# - /uploads/* → http://localhost:3000
|
||||
# - / → 前端静态文件 (挂载 /opt/hms/static/)
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: Dockerfile
|
||||
container_name: hms-server
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
env_file:
|
||||
- .env.production
|
||||
volumes:
|
||||
- ../uploads:/app/uploads
|
||||
- ../config:/app/config:ro
|
||||
- ../static:/app/static
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/api/v1/health"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
start_period: 60s
|
||||
retries: 3
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "2"
|
||||
memory: 1024M
|
||||
reservations:
|
||||
cpus: "0.5"
|
||||
memory: 256M
|
||||
Reference in New Issue
Block a user