build(docker): add Docker build and deployment infrastructure
- 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
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
# }
|
||||
}
|
||||
Reference in New Issue
Block a user