-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (66 loc) · 1.52 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (66 loc) · 1.52 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# 注意:此文件应与 napcat-msg-store 仓库放在同一目录
# 使用方式: docker compose up -d
services:
napcat:
image: mlikiowa/napcat-docker:${NAPCAT_VERSION:-latest}
container_name: napcat
restart: unless-stopped
network_mode: host
volumes:
- /home/vvtommy/napcat-data:/app/.napcat
- napcat_config:/app/napcat/config
- napcat_qq:/app/.config/QQ
healthcheck:
test:
- CMD
- curl
- -f
- -X
- POST
- http://localhost:3000/get_login_info
- -H
- "Content-Type: application/json"
- -d
- "{}"
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
msg-store:
build:
context: .
network: host
container_name: napcat-msg-store
restart: unless-stopped
network_mode: host
environment:
- NAPCAT_WS_URL=ws://localhost:3000
- DB_PATH=/app/data/msg.db
- PORT=8788
volumes:
- msg_data:/app/data
depends_on:
napcat:
condition: service_healthy
healthcheck:
test:
- CMD
- curl
- -f
- http://localhost:8788/health
interval: 30s
timeout: 5s
retries: 3
start_period: 5s
volumes:
# 保留原有的 NapCat 数据卷(匿名卷转为具名卷)
napcat_config:
name: napcat_config_v1
external: false
napcat_qq:
name: napcat_qq_data_v1
external: false
# msg-store 的数据卷
msg_data:
name: napcat_msg_store_data
external: false