-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.version.yml
More file actions
41 lines (40 loc) · 1.44 KB
/
Copy pathdocker-compose.version.yml
File metadata and controls
41 lines (40 loc) · 1.44 KB
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
41
# 部署文件(指定版本)
# 使用已构建的固定版本镜像,适合生产环境稳定部署,不会自动升级。
#
# 用法:
# docker compose -f docker-compose.version.yml up -d
#
# 镜像需先构建或拉取:
# - 本地构建:make build-docker
# - 远程部署:需先将 techfunways/bill:v0.1.4 推送到镜像仓库
#
# 升级到新版本时,修改下方 image 版本号后重新执行:
# docker compose -f docker-compose.version.yml pull && \
# docker compose -f docker-compose.version.yml up -d
version: '3.8'
services:
bill:
image: techfunways/bill:v0.1.4
container_name: techfunway-bill
ports:
- "8907:8907"
volumes:
# 运行时数据/配置目录:数据库、上传文件、日志均存放于此。
# 持久化该目录即可在重建/升级后保留全部账号、配置与数据。
- techfunway-bill-data:/app/data
environment:
# 日志模式:release 或 debug
- ENV=release
# 数据目录(容器内路径,需与上方 volume 挂载点一致)
- DATA_DIR=/app/data
# 服务端口(修改时需同步调整上方 ports 映射)
# - PORT=8907
# 公开接口每分钟限流,0 表示不限
# - RATE_LIMIT=20
# 允许的 CORS 来源,* 表示全部
# - CORS_ORIGIN=*
# 日志保留天数,0 表示永久保留
# - LOG_RETENTION_DAYS=30
restart: unless-stopped
volumes:
techfunway-bill-data: