mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-08 02:03:42 +08:00
opt: 通过环境变量来传参,修正 docker compose 配置参数
This commit is contained in:
4
docker/.gitignore
vendored
Normal file
4
docker/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
mysql/data/*
|
||||
mysql/logs/*
|
||||
logs
|
||||
static/*
|
||||
@@ -1,12 +1,15 @@
|
||||
Listen = "0.0.0.0:5678"
|
||||
ProxyURL = "http://127.0.0.1:7777"
|
||||
ProxyURL = "http://172.22.11.200:7777"
|
||||
MysqlDns = "root:12345678@tcp(172.28.173.76:3307)/chatgpt_plus?charset=utf8mb4&parseTime=True&loc=Local"
|
||||
StaticDir = "./static"
|
||||
StaticUrl = "http://localhost:8080/static"
|
||||
|
||||
[Session]
|
||||
Driver = "cookie"
|
||||
SecretKey = "8k0c67y2or1n7kbmn1w1c86ygqscguoktuf9t524jm64ls585z8uibpdssiy128s"
|
||||
Name = "CHAT_PLUS_SESSION"
|
||||
Path = "/"
|
||||
Domain = "localhost"
|
||||
Domain = ""
|
||||
MaxAge = 86400
|
||||
Secure = false
|
||||
HttpOnly = false
|
||||
@@ -15,3 +18,8 @@ MysqlDns = "root:12345678@tcp(172.28.173.76:3307)/chatgpt_plus?charset=utf8mb4&p
|
||||
[Manager]
|
||||
Username = "admin"
|
||||
Password = "admin123"
|
||||
|
||||
[Redis]
|
||||
Host = "localhost"
|
||||
Port = 6379
|
||||
Password = ""
|
||||
|
||||
@@ -24,7 +24,7 @@ server {
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
|
||||
# 这里配置后端 API 的转发
|
||||
# 后端 API 的转发
|
||||
location /api/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_connect_timeout 300s;
|
||||
@@ -37,10 +37,10 @@ server {
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_pass http://172.28.173.76:6789; # 这里改成后端服务的内网 IP 地址
|
||||
}
|
||||
}
|
||||
|
||||
# 关闭静态资源的日志
|
||||
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$ {
|
||||
access_log off;
|
||||
# 静态资源转发
|
||||
location /static/ {
|
||||
proxy_pass http://172.28.173.76:6789; # 这里改成后端服务的内网 IP 地址
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,19 +2,23 @@ version: '3'
|
||||
services:
|
||||
# 后端 API 程序
|
||||
chatgpt-plus-go:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:v3.0.1
|
||||
# image: chatgpt-plus-go:v3.0.1
|
||||
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-go:v3.0.2
|
||||
# image: chatgpt-plus-go:v3.0.2
|
||||
container_name: chatgpt-plus-go
|
||||
restart: always
|
||||
environment:
|
||||
- DEBUG=false
|
||||
- CONFIG_FILE=config.toml
|
||||
ports:
|
||||
- "6789:5678"
|
||||
volumes:
|
||||
- ./conf/config.toml:/var/www/app/config.toml
|
||||
- ./static:/var/www/app/static
|
||||
|
||||
# 前端应用
|
||||
chatgpt-vue:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:v3.0.1
|
||||
# image: chatgpt-plus-vue:v3.0.1
|
||||
image: registry.cn-hangzhou.aliyuncs.com/geekmaster/chatgpt-plus-vue:v3.0.2
|
||||
# image: chatgpt-plus-vue:v3.0.2
|
||||
container_name: chatgpt-plus-vue
|
||||
restart: always
|
||||
ports:
|
||||
|
||||
@@ -12,4 +12,4 @@ RUN apt-get -qq update \
|
||||
&& apt-get -qq install -y --no-install-recommends ca-certificates curl
|
||||
|
||||
# 容器启动时执行的命令
|
||||
CMD ["./chatgpt-v3-amd64-linux", "--debug=false"]
|
||||
CMD ["./chatgpt-v3-amd64-linux"]
|
||||
|
||||
2
docker/mysql/.gitignore
vendored
2
docker/mysql/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
data/*
|
||||
logs/*
|
||||
Reference in New Issue
Block a user