docker-compose.yml
This commit is contained in:
1 parent
639b0944db
commit
605317c2b2
3 files changed
+5
-3
No files matched your search
@@ -1,5 +1,6 @@
|
||||
# Environments
|
||||
deploy.sh
|
||||
deploy_docker_rsync.sh
|
||||
docs/
|
||||
venv/
|
||||
backend/venv/
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ services:
|
||||
restart: always
|
||||
environment:
|
||||
# 数据库连接 (指向宿主机或其他容器,请根据实际环境修改)
|
||||
- DATABASE_URL=postgresql://postgres:difyai123456@192.168.100.230:5432/hxops_prod
|
||||
- DATABASE_URL=postgresql://postgres:difyai123456@192.168.100.230:5432/hxops_db
|
||||
# Flask 配置
|
||||
- FLASK_APP=run.py
|
||||
- FLASK_ENV=production
|
||||
@@ -19,7 +19,7 @@ services:
|
||||
- "host.docker.internal:host-gateway"
|
||||
# 如果需要在宿主机调试,可暴露端口;生产环境建议只在网络内暴露
|
||||
ports:
|
||||
- "5000:5000"
|
||||
- "5002:5002"
|
||||
networks:
|
||||
- ai-platform
|
||||
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@ server {
|
||||
# API 代理到后端
|
||||
location /api/ {
|
||||
# 注意: 这里使用 Docker Compose 服务名
|
||||
proxy_pass http://hxops-backend:5000/;
|
||||
# 使用 /api/ 后缀确保传递完整路径
|
||||
proxy_pass http://hxops-backend:5000/api/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
Reference in new issue
Block a user