opt: 通过环境变量来传参,修正 docker compose 配置参数

This commit is contained in:
RockYang
2023-06-27 18:29:46 +08:00
parent 871f5d39e4
commit daf83cfc84
13 changed files with 109 additions and 93 deletions

View File

@@ -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 = ""

View File

@@ -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 地址
}
}
}