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:
2026-05-25 01:32:51 +08:00
parent 94a432b14d
commit a27d205535
5 changed files with 72 additions and 3 deletions
+21
View File
@@ -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;
# }
}