-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdocker-compose.yml
77 lines (77 loc) · 2.48 KB
/
docker-compose.yml
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
70
71
72
73
74
75
76
77
version: '3.8'
services:
web:
image: chasney/chatgpt-share-web:v2.2.0
ports:
- "3000:5000"
volumes:
- ./config.yaml:/app/config.yaml
- ./instance:/app/instance
depends_on:
- chatgpt-share-server
- redis
environment:
- REDIS_URL=redis://redis:6379
- FIRST_RUN=True #请在第一次成功部署之后改为False
mysql:
image: mysql:8
command: --mysql-native-password=ON --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
restart: always
volumes:
- ./data/mysql/:/var/lib/mysql/
- ./docker-entrypoint-initdb.d/:/docker-entrypoint-initdb.d/
environment:
TZ: Asia/Shanghai # 指定时区
MYSQL_ROOT_PASSWORD: "123456" # 配置root用户密码
MYSQL_DATABASE: "cool" # 业务库名
MYSQL_USER: "cool" # 业务库用户名
MYSQL_PASSWORD: "123123" # 业务库密码
redis:
image: redis
# command: --requirepass "12345678" # redis库密码,不需要密码注释本行
restart: always
environment:
TZ: Asia/Shanghai # 指定时区
volumes:
- ./data/redis/:/data/
chatgpt-share-server:
image: xyhelper/chatgpt-share-server:latest
restart: always
ports:
- 8300:8001
environment:
TZ: Asia/Shanghai # 指定时区
# 接入网关地址
CHATPROXY: "https://demo.xyhelper.cn"
# 接入网关的authkey
AUTHKEY: "xyhelper"
# 内容审核及速率限制
AUDIT_LIMIT_URL: "http://auditlimit:8080/audit_limit"
ALLOW_DUPLICATE_USER_TOKEN: true
volumes:
- ./list:/app/resource/public/list
- ./config.yaml:/app/config.yaml
- ./data/chatgpt-share-server/:/app/data/
- ./list.js:/app/resource/public/list.js
labels:
- "com.centurylinklabs.watchtower.scope=xyhelper-chatgpt-share-server"
auditlimit:
image: xyhelper/auditlimit # 限速服务,可以限制每个用户使用的次数
restart: always
# ports:
# - 9611:8080
environment:
LIMIT: 40 # 限制每个userToken允许的次数
PER: "3h" # 限制周期 1s, 1m, 1h, 1d, 1w, 1y
labels:
- "com.centurylinklabs.watchtower.scope=xyhelper-chatgpt-share-server"
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --scope xyhelper-chatgpt-share-server --cleanup
restart: always
environment:
- TZ=Asia/Shanghai
labels:
- "com.centurylinklabs.watchtower.scope=xyhelper-chatgpt-share-server"