chore: 更新生产环境配置为指定服务器IP

将前端、后端和Nginx配置中的localhost替换为172.18.52.77,以适配生产环境部署需求
This commit is contained in:
zhangtao
2025-05-27 00:39:41 +08:00
parent 13327e1314
commit 6fc9e22742
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -35,7 +35,7 @@ DB_DRIVER = "mysql" # sqlite、mysql、postgresql
SQLITE_DB_NAME = "prod_sql.db" SQLITE_DB_NAME = "prod_sql.db"
# MYSQL配置 # MYSQL配置
MYSQL_HOST = "localhost" MYSQL_HOST = "172.18.52.77"
MYSQL_USER = "root" MYSQL_USER = "root"
MYSQL_PASSWORD = 123456 MYSQL_PASSWORD = 123456
MYSQL_PORT = 3306 MYSQL_PORT = 3306
@@ -43,7 +43,7 @@ MYSQL_DB_NAME = "fastapi_vue3_admin"
# Redis配置 # Redis配置
REDIS_ENABLE = True REDIS_ENABLE = True
REDIS_HOST = "localhost" REDIS_HOST = "172.18.52.77"
REDIS_PORT = 6379 REDIS_PORT = 6379
REDIS_USER = '' REDIS_USER = ''
REDIS_PASSWORD = '' REDIS_PASSWORD = ''
@@ -51,7 +51,7 @@ REDIS_DB_NAME = 1
# MongoDB配置 # MongoDB配置
MONGO_DB_ENABLE = False MONGO_DB_ENABLE = False
MONGO_DB_HOST = "localhost" MONGO_DB_HOST = "172.18.52.77"
MONGO_DB_USER = "root" MONGO_DB_USER = "root"
MONGO_DB_PASSWORD = 123456 MONGO_DB_PASSWORD = 123456
MONGO_DB_PORT = 27017 MONGO_DB_PORT = 27017
+1 -1
View File
@@ -47,7 +47,7 @@ http {
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true; proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:8001; proxy_pass http://172.18.52.77:8001;
} }
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
+1 -1
View File
@@ -9,7 +9,7 @@ VITE_APP_TITLE=生产环境
VITE_APP_BASE_API=/api/v1 VITE_APP_BASE_API=/api/v1
# 网络请求公用地址 # 网络请求公用地址
VITE_API_BASE_URL='http://localhost:8001' VITE_API_BASE_URL='http://172.18.52.77:8001'
# 请求超时时间 # 请求超时时间
VITE_TIMEOUT=10000 VITE_TIMEOUT=10000