-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrender.yaml
40 lines (40 loc) · 1.01 KB
/
render.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
services:
- type: web
name: kbk-qr-code-download-system
env: node
buildCommand: |
# 安装系统依赖
apt-get update && apt-get install -y python3 build-essential
# 创建数据目录并设置权限
mkdir -p /opt/render/project/src/data
chmod 755 /opt/render/project/src/data
# 创建图片目录
mkdir -p public/images
chmod 755 public/images
# 创建缓存目录
mkdir -p .next/cache
# 安装依赖并构建
npm ci
npm run build
startCommand: npm start
nodeVersion: 18.x
envVars:
- key: NODE_ENV
value: production
- key: ADMIN_PASSWORD
sync: false
- key: NEXT_TELEMETRY_DISABLED
value: "1"
- key: DB_PATH
value: "/opt/render/project/src/data"
buildFilter:
paths:
- src/**
- public/**
- package.json
- next.config.js
- tsconfig.json
disk:
name: data
mountPath: /opt/render/project/src/data
sizeGB: 1