a27d205535
- Add multi-stage Dockerfile with pnpm install and Nginx serving - Add nginx.conf with gzip and SPA fallback - Add docker-build.sh script for building and pushing images - Add .dockerignore for build context optimization - Remove unused pnpm-workspace.yaml
22 lines
515 B
Nginx Configuration File
22 lines
515 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
|
|
gzip on;
|
|
gzip_types text/css application/javascript application/json image/svg+xml;
|
|
gzip_vary on;
|
|
|
|
# SPA fallback
|
|
location / {
|
|
try_files $uri /index.html;
|
|
}
|
|
|
|
# 可选的 API 代理,取消注释并改 backend 地址即可
|
|
# location /api/ {
|
|
# proxy_pass http://backend:8080;
|
|
# proxy_set_header Host $host;
|
|
# proxy_set_header X-Real-IP $remote_addr;
|
|
# }
|
|
}
|