feat: add Docker support with multi-stage build and CI/CD workflow

- Introduced Dockerfile for multi-stage application build and deployment using Nginx.
- Added .dockerignore to exclude unnecessary files from the Docker context.
- Created nginx.conf for server configuration, including Gzip compression and SPA routing.
- Implemented Gitea CI/CD workflow for building and pushing Docker images on version tags.
This commit is contained in:
typist
2025-10-27 20:16:22 +08:00
parent a1e2239458
commit c11bb6d637
4 changed files with 219 additions and 0 deletions

62
.dockerignore Normal file
View File

@@ -0,0 +1,62 @@
# 依赖
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# 构建产物
dist
dist-ssr
*.local
# 编辑器
.vscode
.idea
*.swp
*.swo
*~
# 操作系统
.DS_Store
Thumbs.db
# Git
.git
.gitignore
.gitattributes
# CI/CD
.gitea
.github
.gitlab-ci.yml
# Docker
Dockerfile
.dockerignore
docker-compose.yaml
docker-compose.*.yaml
compose*yaml
# 测试
coverage
.nyc_output
# 环境变量
.env
.env.local
.env.*.local
# 日志
logs
*.log
# 临时文件
tmp
temp
# 文档
README.md
LICENSE
*.md