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
| services:
#主程序
uniapi:
image: yym68686/uni-api:latest
restart: unless-stopped
ports:
- "8001:8000"
volumes:
- ./api.yaml:/home/api.yaml
- ./data:/home/data
#面板服务
uniapi-frontend:
image: ghcr.io/melosbot/uni-api-status:latest
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
# 以下为容器内的路径,与 volumes 挂载点对应
- API_YAML_PATH=/app/config/api.yaml
- STATS_DB_PATH=/app/data/stats.db
volumes:
# 将宿主机的 api.yaml 挂载到容器内,需要【读写】权限
- ./api.yaml:/app/config/api.yaml
# 将宿主机包含 stats.db 的目录挂载到容器内,建议只读【:ro】
- ./data:/app/data:ro
|