-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (34 loc) · 1.33 KB
/
Copy pathdocker-compose.yml
File metadata and controls
34 lines (34 loc) · 1.33 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
# AITokenPool — Docker Compose 一键部署(v0.6.6)
#
# 快速开始:
# docker compose up -d --build
# 浏览器打开 http://localhost:8080/
#
# ⚠️ 生产环境必须设置 ATP_MASTER_KEY(32 字节 hex 主密钥):
# 生成:openssl rand -hex 32
# 注入:export ATP_MASTER_KEY=$(openssl rand -hex 32) && docker compose up -d
# 未设置时使用示例默认值(dev 模式,重启后已加密的上游 key 不可解密,仅用于本地试用)。
#
# 统一数据目录(rant 2026-08-19T20:53:23):只挂载一个 /data 卷,
# config.toml(首次启动自动从内置示例复制)+ aitokenpool.db + logs/ 全在 ./atp-data/ 下。
services:
aitokenpool:
build: .
image: aitokenpool:0.6.6
ports:
- "8080:8080"
volumes:
# 统一数据目录:config / db / logs 全在这里(服务端 --data-dir /data)
- ./atp-data:/data
environment:
# 主密钥(32 字节 hex;env 优先于 config [server].master_key)
- ATP_MASTER_KEY=${ATP_MASTER_KEY:-dev-master-key-请替换}
# 统一数据目录(与 Dockerfile CMD --data-dir /data 一致)
- ATP_DATA_DIR=/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/healthz"]
interval: 10s
timeout: 3s
retries: 5
start_period: 10s
restart: unless-stopped