mirror of
https://github.com/patdelphi/suanming.git
synced 2026-02-27 21:23:12 +08:00
- 更新.koyeb/koyeb.yaml添加完整环境变量配置 - 添加DB_PATH明确指定生产环境数据库路径 - 增强数据库管理器日志输出,显示路径和环境信息 - 添加数据库目录创建状态日志 - 更新.env.example添加数据库配置说明 - 确保本地开发和Koyeb生产环境数据库路径正确分离 - 实现完整的数据库持久化方案
39 lines
886 B
YAML
39 lines
886 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: "/app/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: /app/data
|
|
size: 1GB
|
|
health_check:
|
|
http:
|
|
path: /api/health
|
|
port: 8000
|
|
initial_delay_seconds: 30
|
|
period_seconds: 10
|
|
timeout_seconds: 5
|
|
failure_threshold: 3 |