增加nginx代理,https域名
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user