feat: 添加 Docker 部署配置
- 添加 Dockerfile (多阶段构建: Node 构建 → Nginx 托管) - 添加 docker-compose.yml (端口 8801, 自动重启) - 添加 .dockerignore (减少构建体积) - 添加 docker-deploy.md (部署文档) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
23
docker-compose.yml
Normal file
23
docker-compose.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: tianxuan-company
|
||||
ports:
|
||||
- "8801:80"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
networks:
|
||||
- tianxuan-network
|
||||
|
||||
networks:
|
||||
tianxuan-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user