Some checks failed
CD Pipeline / deploy (push) Failing after 59s
- 建立 Gitea Actions CD pipeline (.gitea/workflows/cd.yaml) - 部署模式: rsync Python 檔案至 188 → docker restart (volume mount) - Dockerfile/requirements 變動時自動重建 Docker image - 部署通知: Telegram (開始/成功/失敗) - 健康檢查: https://mo.wooo.work/health (最多 5 次重試) - 同步最新 CLAUDE.md / ADR-008 / memory (2026-04-19) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
85 lines
2.4 KiB
YAML
85 lines
2.4 KiB
YAML
# =============================================================================
|
|
# WOOO TECH - DevOps Services (GitLab + Runner)
|
|
# =============================================================================
|
|
# 部署位置: UAT Server (192.168.0.110)
|
|
# 用途: 自建 Git 伺服器 + CI/CD 平台
|
|
# =============================================================================
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
# ---------------------------------------------------------------------------
|
|
# GitLab CE - Git 伺服器 + CI/CD
|
|
# ---------------------------------------------------------------------------
|
|
gitlab:
|
|
image: gitlab/gitlab-ce:16.8.1-ce.0
|
|
container_name: wooo-gitlab
|
|
hostname: gitlab.wooo.local
|
|
restart: unless-stopped
|
|
environment:
|
|
GITLAB_OMNIBUS_CONFIG: |
|
|
# 外部 URL
|
|
external_url 'http://192.168.0.110:8929'
|
|
gitlab_rails['gitlab_shell_ssh_port'] = 2224
|
|
|
|
# 降低資源使用
|
|
puma['workers'] = 2
|
|
puma['min_threads'] = 1
|
|
puma['max_threads'] = 4
|
|
|
|
sidekiq['max_concurrency'] = 10
|
|
sidekiq['min_concurrency'] = 1
|
|
|
|
postgresql['shared_buffers'] = "256MB"
|
|
postgresql['max_worker_processes'] = 4
|
|
|
|
prometheus_monitoring['enable'] = false
|
|
grafana['enable'] = false
|
|
|
|
# 停用不需要的服務
|
|
gitlab_kas['enable'] = false
|
|
sentinel['enable'] = false
|
|
|
|
# 容器 Registry (使用外部 Harbor)
|
|
registry['enable'] = false
|
|
ports:
|
|
- "8929:8929" # HTTP
|
|
- "2224:22" # SSH
|
|
volumes:
|
|
- gitlab-config:/etc/gitlab
|
|
- gitlab-logs:/var/log/gitlab
|
|
- gitlab-data:/var/opt/gitlab
|
|
shm_size: '256m'
|
|
networks:
|
|
- devops
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# GitLab Runner - CI/CD 執行器
|
|
# ---------------------------------------------------------------------------
|
|
gitlab-runner:
|
|
image: gitlab/gitlab-runner:v16.8.0
|
|
container_name: wooo-gitlab-runner
|
|
restart: unless-stopped
|
|
volumes:
|
|
- gitlab-runner-config:/etc/gitlab-runner
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
networks:
|
|
- devops
|
|
depends_on:
|
|
- gitlab
|
|
|
|
networks:
|
|
devops:
|
|
name: wooo-devops
|
|
driver: bridge
|
|
|
|
volumes:
|
|
gitlab-config:
|
|
name: wooo-gitlab-config
|
|
gitlab-logs:
|
|
name: wooo-gitlab-logs
|
|
gitlab-data:
|
|
name: wooo-gitlab-data
|
|
gitlab-runner-config:
|
|
name: wooo-gitlab-runner-config
|