refactor: 通用技能按类别拆分为独立目录
skills/ → skills-dev(9), skills-req(10), skills-ops(4), skills-integration(8), skills-biz(4), skills-workflow(7) generate-marketplace.py 改为自动扫描所有 skills-* 目录。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
100
skills-ops/ops-tools-plugin/coolbuy-deploy.md
Normal file
100
skills-ops/ops-tools-plugin/coolbuy-deploy.md
Normal file
@@ -0,0 +1,100 @@
|
||||
# Coolbuy-PaaS 部署指南
|
||||
|
||||
**创建时间**: 2026-01-29 11:50:00 CST
|
||||
**父技能**: ops-tools
|
||||
|
||||
## 仓库信息
|
||||
|
||||
| 仓库 | 地址 | 说明 |
|
||||
|------|------|------|
|
||||
| coolbuy-paas | git@gitea.pipexerp.com:pipexerp/coolbuy-paas.git | 租户业务系统 |
|
||||
| coolbuy-platform | git@gitea.pipexerp.com:pipexerp/coolbuy-platform.git | 平台管理端 |
|
||||
| coolbuy-legacy | git@gitea.pipexerp.com:pipexerp/coolbuy-legacy.git | 遗留项目 |
|
||||
|
||||
## 镜像信息
|
||||
|
||||
| 服务 | 镜像 | Dockerfile |
|
||||
|------|------|------------|
|
||||
| Auth | saltthing123/coolbuy-paas-auth | auth-service/Dockerfile |
|
||||
| Foundation | saltthing123/coolbuy-paas-foundation | foundation-service/Dockerfile |
|
||||
| ERP | saltthing123/coolbuy-paas-erp | erp-service/Dockerfile |
|
||||
| Web | saltthing123/coolbuy-paas-web | web/Dockerfile |
|
||||
|
||||
## 生产环境
|
||||
|
||||
| 项目 | 值 |
|
||||
|------|-----|
|
||||
| 服务器 IP | 39.106.88.83 |
|
||||
| 架构 | AMD64 |
|
||||
| 部署目录 | /opt/coolbuy-paas |
|
||||
| Web 端口 | 8888 |
|
||||
|
||||
## 部署流程(本地构建 + Jenkins 部署)
|
||||
|
||||
### 步骤 1: 本地构建并推送
|
||||
|
||||
```bash
|
||||
cd /path/to/coolbuy-paas
|
||||
|
||||
# 构建单个服务(AMD64 架构)
|
||||
docker buildx build --platform linux/amd64 -t saltthing123/coolbuy-paas-web:latest ./web --push
|
||||
|
||||
# 构建所有服务
|
||||
./scripts/build-and-push.sh --push --platform linux/amd64
|
||||
```
|
||||
|
||||
### 步骤 2: 触发 Jenkins 部署
|
||||
|
||||
```bash
|
||||
source ~/.config/devops/credentials.env
|
||||
|
||||
# 部署到生产
|
||||
curl -X POST "$JENKINS_URL/job/coolbuy-paas/buildWithParameters" \
|
||||
-u "$JENKINS_USER:$JENKINS_TOKEN" \
|
||||
--data "ACTION=deploy-prod&IMAGE_TAG=latest"
|
||||
|
||||
# 部署到测试
|
||||
curl -X POST "$JENKINS_URL/job/coolbuy-paas/buildWithParameters" \
|
||||
-u "$JENKINS_USER:$JENKINS_TOKEN" \
|
||||
--data "ACTION=deploy-test&IMAGE_TAG=latest"
|
||||
```
|
||||
|
||||
### 一键部署命令
|
||||
|
||||
```bash
|
||||
cd /path/to/coolbuy-paas && \
|
||||
docker buildx build --platform linux/amd64 -t saltthing123/coolbuy-paas-web:latest ./web --push && \
|
||||
source ~/.config/devops/credentials.env && \
|
||||
curl -X POST "$JENKINS_URL/job/coolbuy-paas/buildWithParameters" \
|
||||
-u "$JENKINS_USER:$JENKINS_TOKEN" \
|
||||
--data "ACTION=deploy-prod&IMAGE_TAG=latest"
|
||||
```
|
||||
|
||||
## 查看构建状态
|
||||
|
||||
```bash
|
||||
source ~/.config/devops/credentials.env
|
||||
|
||||
# 构建状态
|
||||
curl -s "$JENKINS_URL/job/coolbuy-paas/lastBuild/api/json" \
|
||||
-u "$JENKINS_USER:$JENKINS_TOKEN" | jq '.result, .building'
|
||||
|
||||
# 构建日志
|
||||
curl -s "$JENKINS_URL/job/coolbuy-paas/lastBuild/consoleText" \
|
||||
-u "$JENKINS_USER:$JENKINS_TOKEN" | tail -50
|
||||
```
|
||||
|
||||
## 检查镜像架构
|
||||
|
||||
```bash
|
||||
# 本地镜像
|
||||
docker inspect saltthing123/coolbuy-paas-web:latest | grep Architecture
|
||||
|
||||
# DockerHub 镜像
|
||||
docker manifest inspect saltthing123/coolbuy-paas-web:latest | grep architecture
|
||||
```
|
||||
|
||||
## 重要提醒
|
||||
|
||||
- 生产服务器为 AMD64 架构,必须使用 `--platform linux/amd64`
|
||||
- 禁止在 Jenkins 服务器构建镜像,所有镜像本地构建后推送到 DockerHub
|
||||
Reference in New Issue
Block a user