Files
Edu/infra/docker-compose.tools.yml
SpecialX 68ddff1065
Some checks failed
CI / quality-go (push) Failing after 3s
CI / quality-proto (push) Failing after 2s
CI / quality-ts (push) Failing after 47s
CI / deploy (push) Has been skipped
refactor(infra): 重构为 no-push 本地构建部署模式
- 删除 6 个分散 workflow(ci-ts/ci-go/ci-proto/ci-py/docker/deploy)
- 合并为单个 ci.yml:3 个 quality job 并行 + deploy job 串行
- 全部使用官方镜像(node:22-alpine/golang:1.22-alpine/bufbuild/buf/docker:25-git)
- deploy job 用 DooD 模式挂载 /var/run/docker.sock
- docker-compose.deploy.yml 改用 build: 替代 image:(no-push)
- 新增 docker-compose.tools.yml 一次性预拉所有 CI 镜像
- 支持 workflow_dispatch 指定 commit_sha 回滚
- 更新 project_rules §15 与 cicd-runbook.md 为 no-push 模式
- 新增设计文档 docs/superpowers/specs/2026-07-08-cicd-no-push-local-build-design.md
2026-07-08 17:12:57 +08:00

56 lines
1.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CI/CD 工具镜像预拉(一次性拉取所有 CI 与构建需要的镜像到本地)
# 用途actrunner 的 container job 会优先使用本地镜像缓存,避免每次 CI 联网拉取
#
# 用法:
# docker compose -f infra/docker-compose.tools.yml pull
#
# 拉取后可用 docker images 查看所有 edu 相关镜像
# 这不是常驻服务,只是借用 compose 的批量 pull 能力
name: edu-tools
services:
# ===== CI 运行时镜像actrunner container job 使用)=====
node-ci:
image: node:22-alpine
command: ["echo", "node-ci image pulled"]
golang-ci:
image: golang:1.22-alpine
command: ["echo", "golang-ci image pulled"]
buf-ci:
image: bufbuild/buf:latest
command: ["echo", "buf-ci image pulled"]
docker-ci:
image: docker:25-git
command: ["echo", "docker-ci image pulled"]
# ===== 服务构建基础镜像Dockerfile FROM=====
# teacher-portal / classes 的 builder 阶段
node-builder:
image: node:20-alpine
command: ["echo", "node-builder image pulled"]
# api-gateway 的 builder 阶段
golang-builder:
image: golang:1.22-alpine
command: ["echo", "golang-builder image pulled"]
# api-gateway 的 runner 阶段
alpine-runner:
image: alpine:3.20
command: ["echo", "alpine-runner image pulled"]
# ===== 开发/测试基础设施(生产用已有的,不在此管理)=====
# 服务器已有的 MySQL/Redis 不在此拉取
# 仅用于本地开发测试环境docker-compose.dev.yml如有
mysql-dev:
image: mysql:8.0
command: ["echo", "mysql-dev image pulled"]
redis-dev:
image: redis:7-alpine
command: ["echo", "redis-dev image pulled"]