mirror of
https://github.com/patdelphi/suanming.git
synced 2026-02-28 05:33:11 +08:00
- 根据Koyeb实际挂载信息(/workspace/data)调整数据库路径配置 - 添加Koyeb环境检测逻辑,优先使用/workspace/data路径 - 更新.koyeb/koyeb.yaml中的mount_path和DB_PATH配置 - 增强日志输出,显示Koyeb环境状态和工作目录 - 解决数据库持久化路径不匹配导致的数据丢失问题 - 确保Volume正确挂载到/workspace/data目录
39 lines
898 B
YAML
39 lines
898 B
YAML
# Koyeb部署配置文件
|
|
name: suanming-app
|
|
|
|
services:
|
|
- name: suanming-backend
|
|
type: web
|
|
git:
|
|
branch: master
|
|
build_command: npm ci && npm run build
|
|
run_command: npm start
|
|
instance_type: nano
|
|
ports:
|
|
- port: 8000
|
|
protocol: http
|
|
env:
|
|
- key: NODE_ENV
|
|
value: production
|
|
- key: PORT
|
|
value: "8000"
|
|
- key: DB_PATH
|
|
value: "/workspace/data/numerology.db"
|
|
- key: JWT_SECRET
|
|
value: "xVtKLcdGpYdtoEjEBE9hFTJgBCJrEIu9AjXtAJMtwTU="
|
|
- key: JWT_EXPIRES_IN
|
|
value: "7d"
|
|
- key: LOG_LEVEL
|
|
value: "info"
|
|
volumes:
|
|
- name: sqlite-data
|
|
mount_path: /workspace/data
|
|
size: 1GB
|
|
health_check:
|
|
http:
|
|
path: /api/health
|
|
port: 8000
|
|
initial_delay_seconds: 30
|
|
period_seconds: 10
|
|
timeout_seconds: 5
|
|
failure_threshold: 3 |