添加 CI/CD 构建配置与部署文件
- deploy/Dockerfile:多阶段构建,node:24-alpine(阿里镜像)构建 dist,nginx:alpine 作为成品镜像;构建上下文为仓库根目录 - deploy/nginx.conf:Vue Router history 模式 SPA 配置,含 gzip 压缩和 /assets/ 长期缓存 - deploy/compose.yaml:以 zhican-admin:latest 启动服务,对外暴露 12801 端口 - .teamcity/pipeline.yaml:main 分支触发,build/deploy 独立 step Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c8a18c9ec3
commit
a6afbcffeb
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
name: zhican-admin
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: 构建 Docker 镜像
|
||||
steps:
|
||||
- name: Docker Build
|
||||
script: |
|
||||
docker build \
|
||||
-f deploy/Dockerfile \
|
||||
-t zhican-admin:latest \
|
||||
.
|
||||
|
||||
deploy:
|
||||
name: 启动服务
|
||||
needs: build
|
||||
steps:
|
||||
- name: Compose Up
|
||||
script: |
|
||||
docker compose -f deploy/compose.yaml up -d
|
||||
Reference in New Issue
Block a user