forked from hncboy/ai-beehive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
43 lines (41 loc) · 1.18 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
version: '3'
services:
# MySQL 服务
mysql_gpt:
image: hncboy/chatgpt-web-java-mysql:latest
container_name: mysql_gpt
# ports:
# - 3309:3306
volumes:
- ~/mydata/mysql/data:/var/lib/mysql #数据文件挂载
- ~/mydata/mysql/conf:/etc/mysql/conf.d #配置文件挂载
- ~/mydata/mysql/log:/var/log/mysql #日志文件挂载
networks:
gpt_network:
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping" , "-h", "localhost" ]
interval: 5s
timeout: 10s
retries: 5
# Java 服务
java_gpt:
image: hncboy/chatgpt-web-java:latest
container_name: java_gpt
environment:
# 这里要用 mysql_gpt 的 3306 端口
- JDBC_URL=jdbc:mysql://mysql_gpt:3306/chat?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
- MYSQL_USER_NAME=root
- MYSQL_PASSWORD=123456
- CHAT_OPENAI_API_KEY=xxx
- CHAT_OPENAI_ACCESS_TOKEN=
- CHAT_OPENAI_API_BASE_URL=https://api.openai.com/
- CHAT_HTTP_PROXY_HOST:127.0.0.1
ports:
- 3002:3002
depends_on:
- mysql_gpt
restart: on-failure
networks:
gpt_network:
networks:
gpt_network: