Update 2026-06-23 10:40:10
Build and Push Docker Images / Build Backend Image (push) Has been cancelled
Build and Push Docker Images / Build Frontend Image (push) Has been cancelled
Build and Push Docker Images / Notify Build Complete (push) Has been cancelled

This commit is contained in:
yi
2026-06-23 10:40:10 +08:00
parent 864efb7f9d
commit e9bff9beb3
56 changed files with 295 additions and 292 deletions
+7 -7
View File
@@ -52,8 +52,8 @@
GitHub Actions
├── 构建 idc-backend:latest 镜像
├── 构建 idc-frontend:latest 镜像(Nginx + 前端静态文件)
├── 构建 yunrui_asset-backend:latest 镜像
├── 构建 yunrui_asset-frontend:latest 镜像(Nginx + 前端静态文件)
├── 推送到镜像仓库(Docker Hub / 阿里云 / GitHub Container Registry
@@ -74,11 +74,11 @@
```yaml
services:
backend:
image: yourname/idc-backend:latest
image: yourname/yunrui_asset-backend:latest
# 没有 build 指令,直接从仓库拉取
frontend:
image: yourname/idc-frontend:latest
image: yourname/yunrui_asset-frontend:latest
# 同上,服务器不需要装 Node.js
mysql:
@@ -134,8 +134,8 @@ BACKEND_VERSION=v1.2.0 FRONTEND_VERSION=v1.2.0 docker compose up -d
### 5.1 镜像仓库:阿里云容器镜像服务
阿里云控制台开通容器镜像服务后:
1. 创建命名空间(如 `idc-assest`
2. 创建镜像仓库:`idc-backend``idc-frontend`
1. 创建命名空间(如 `yunrui-asset`
2. 创建镜像仓库:`yunrui_asset-backend``yunrui_asset-frontend`
3. 设置访问凭证(用户名 + 密码)
### 5.2 GitHub Secrets 配置
@@ -171,7 +171,7 @@ BACKEND_VERSION=v1.2.0 FRONTEND_VERSION=v1.2.0 docker compose up -d
管理员 SSH 到生产服务器
cd /opt/idc_assest
cd /opt/yunrui_assetet
docker compose -f docker-compose.prod.yml pull
docker compose -f docker-compose.prod.yml up -d
```