增加nginx代理,https域名

This commit is contained in:
2026-04-14 09:39:40 +08:00
parent c7ee52a1a1
commit d4ab6db42e
24 changed files with 138 additions and 1 deletions

View File

@@ -75,7 +75,7 @@ services:
depends_on:
- backend
environment:
VITE_API_BASE_URL: http://47.238.126.111:33001
VITE_API_BASE_URL: /api
VITE_API_URL: http://backend:3001
ports:
- "2000:3000"
@@ -91,6 +91,27 @@ services:
retries: 3
start_period: 30s
# Nginx反向代理服务
nginx:
image: nginx:alpine
container_name: performance-nginx
restart: unless-stopped
depends_on:
- frontend
- backend
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- app-network
healthcheck:
test: ["CMD", "nginx", "-t"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# 定义网络
networks:
app-network: