- 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)
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
version: "3.8"
|
|
|
|
# WARNING: 生产环境必须通过 .env 文件或环境变量覆盖默认密码
|
|
# 不要在生产环境使用默认密码
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: erp-postgres
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-erp}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-erp_dev_2024}
|
|
POSTGRES_DB: ${POSTGRES_DB:-erp}
|
|
expose:
|
|
- "5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-erp}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "1.0"
|
|
memory: 512M
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: erp-redis
|
|
command: redis-server --requirepass ${REDIS_PASSWORD:-erp_redis_dev} --appendonly yes
|
|
expose:
|
|
- "6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-erp_redis_dev}", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "1.0"
|
|
memory: 512M
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|