上传文件至 dist
This commit is contained in:
commit
c817ea96b1
11
dist/compose.yml
vendored
Normal file
11
dist/compose.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
web:
|
||||
image: nginx
|
||||
restart: always
|
||||
volumes:
|
||||
- ./dist:/usr/share/nginx/html # Ensure ./web/dist folder exists and contains built frontend files
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
ports:
|
||||
- "9809:80" # Expose standard HTTP port, ensure WEB_PORT is defined in .env file
|
||||
23
dist/nginx.conf
vendored
Normal file
23
dist/nginx.conf
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
client_max_body_size 10000M;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://172.17.0.1:16532/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;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# WebSocket support (关键配置)
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user