docs(infra): update Forgejo docs to mirror-only, remove obsolete workflows

- Remove .forgejo/workflows/ (go-services, smoke-tests) — Forgejo is
  mirror-only, no CI/CD
- Remove setup-forgejo-runner.sh — runner removed (no macOS binary)
- Update MAC_MINI_SERVER.md: document Forgejo as mirror, fix CI/CD section
- Update FIX_COLIMA_MOUNTS.md: add root cause fix note (startup.sh)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-30 20:44:54 +02:00
parent b44bd44666
commit dffb5eb9dc
5 changed files with 26 additions and 225 deletions

View file

@ -1,79 +0,0 @@
# CI for Go Services
# Runs on push to main or PRs — builds and tests all Go services
# Compatible with both Forgejo Actions and GitHub Actions
name: Go Services CI
on:
push:
branches: [main]
paths:
- 'services/mana-search/**'
- 'services/mana-notify/**'
- 'services/mana-crawler/**'
- 'services/mana-api-gateway/**'
- 'services/mana-sync/**'
- 'services/mana-matrix-bot/**'
pull_request:
paths:
- 'services/mana-search/**'
- 'services/mana-notify/**'
- 'services/mana-crawler/**'
- 'services/mana-api-gateway/**'
- 'services/mana-sync/**'
- 'services/mana-matrix-bot/**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
service:
- mana-search
- mana-notify
- mana-crawler
- mana-api-gateway
- mana-sync
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Test ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
go vet ./...
go test ./... -v -count=1
- name: Build ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
CGO_ENABLED=0 go build -ldflags="-s -w" -o /dev/null ./cmd/server
docker:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
strategy:
matrix:
include:
- service: mana-search
image: mana-search
- service: mana-notify
image: mana-notify
- service: mana-crawler
image: mana-crawler
- service: mana-api-gateway
image: mana-api-gateway
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build \
-f services/${{ matrix.service }}/Dockerfile \
-t ${{ matrix.image }}:${{ github.sha }} \
-t ${{ matrix.image }}:latest \
.

View file

@ -1,91 +0,0 @@
# Smoke Tests: Verify all production services are healthy
# Runs on schedule (every 6h) and manual trigger
name: Smoke Tests
on:
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
jobs:
go-services:
runs-on: ubuntu-latest
steps:
- name: Check Go services
run: |
FAILED=0
for svc in \
"mana-search:3012" \
"mana-notify:3013" \
"mana-crawler:3014" \
"mana-api-gateway:3016" \
"mana-sync:3051" \
"mana-matrix-bot:4000" \
"forgejo:3041"
do
NAME=$(echo $svc | cut -d: -f1)
PORT=$(echo $svc | cut -d: -f2)
if [ "$NAME" = "forgejo" ]; then
URL="http://mana-core-forgejo:$PORT/api/v1/version"
elif [ "$NAME" = "mana-matrix-bot" ]; then
URL="http://mana-matrix-bot:$PORT/health"
else
URL="http://$(echo $NAME | sed 's/mana-/mana-core-/;s/core-api/api/;s/core-crawler/crawler/;s/core-matrix/matrix/'):$PORT/health"
fi
echo -n "$NAME... "
STATUS=$(wget -qO- --timeout=5 "$URL" 2>/dev/null | grep -o '"status":"[a-z]*"' | head -1 || echo "UNREACHABLE")
if echo "$STATUS" | grep -qE 'ok|healthy'; then
echo "OK"
else
echo "FAILED ($STATUS)"
FAILED=$((FAILED + 1))
fi
done
if [ $FAILED -gt 0 ]; then
echo "$FAILED service(s) failed health check"
exit 1
fi
echo "All services healthy"
web-apps:
runs-on: ubuntu-latest
steps:
- name: Check web app health endpoints
run: |
FAILED=0
for app in \
"mana.how:5000" \
"chat:5010" \
"todo:5011" \
"calendar:5012" \
"clock:5013" \
"contacts:5014" \
"storage:5015" \
"presi:5016" \
"nutriphi:5017" \
"zitare:5018" \
"photos:5019" \
"skilltree:5020" \
"picture:5021" \
"citycorners:5022" \
"mukke:5180"
do
NAME=$(echo $app | cut -d: -f1)
PORT=$(echo $app | cut -d: -f2)
CONTAINER="mana-app-$(echo $NAME | sed 's/\.mana\.how//')-web"
[ "$NAME" = "mana.how" ] && CONTAINER="mana-app-web"
echo -n "$NAME... "
CODE=$(wget -qO /dev/null --timeout=5 -S "http://$CONTAINER:$PORT/" 2>&1 | grep "HTTP/" | tail -1 | awk '{print $2}' || echo "000")
if [ "$CODE" = "200" ] || [ "$CODE" = "302" ]; then
echo "OK ($CODE)"
else
echo "FAILED ($CODE)"
FAILED=$((FAILED + 1))
fi
done
if [ $FAILED -gt 0 ]; then
echo "$FAILED app(s) failed"
exit 1
fi
echo "All web apps responding"

View file

@ -82,3 +82,10 @@ Alle sollten "Up" und "healthy" zeigen.
`colima start --mount /Volumes/ManaData:w` wurde nur das externe SSD
gemountet, nicht das Home-Directory `/Users/mana`. Ohne diesen Mount
sieht VirtioFS alle Host-Dateien als leere Verzeichnisse.
## Root Cause Fix (2026-03-30)
Das `startup.sh` Script wurde gefixt:
- `colima delete --force` entfernt (loeschte Mount-Config bei jedem Hard-Shutdown-Recovery)
- `--mount /Users/mana:w` wird jetzt immer bei `colima start` mitgegeben
- Damit tritt das Problem bei kuenftigen Neustarts nicht mehr auf

View file

@ -114,13 +114,26 @@ cd ~/projects/manacore-monorepo
## CI/CD
Ein GitHub Actions Self-Hosted Runner läuft auf dem Mac Mini und deployt automatisch bei Push auf `main`.
Ein GitHub Actions Self-Hosted Runner läuft nativ auf dem Mac Mini und deployt automatisch bei Push auf `main`.
- **Workflow:** `.github/workflows/cd-macmini.yml`
- **Runner:** `mac-mini` (self-hosted, macOS, ARM64)
- **Setup-Doku:** [MAC_MINI_RUNNER_SETUP.md](MAC_MINI_RUNNER_SETUP.md)
- **CD Workflow:** `.github/workflows/cd-macmini.yml`
- **Mirror Workflow:** `.github/workflows/mirror-to-forgejo.yml` (GitHub → Forgejo Sync)
- **Runner:** `mac-mini` (self-hosted, macOS, ARM64, LaunchAgent)
- **Manuelles Deployment:** https://github.com/Memo-2023/manacore-monorepo/actions/workflows/cd-macmini.yml
Manuelles Deployment: https://github.com/Memo-2023/manacore-monorepo/actions/workflows/cd-macmini.yml
### Forgejo (Mirror-Only)
Forgejo v11 läuft als Push-Mirror von GitHub — kein CI/CD, nur Backup und Sichtbarkeit.
- **URL:** https://git.mana.how (Port 3041)
- **SSH:** Port 2222
- **Sync:** Automatisch bei jedem Push auf `main` via GitHub Actions
- **Kein Runner:** Forgejo Runner hat kein macOS-Binary, Docker-Runner kann nicht auf Host zugreifen
```
lokal → git push → GitHub → CD (nativer Runner) → Docker deploy
→ Mirror → Forgejo (Backup)
```
## Wichtige Befehle
@ -499,7 +512,7 @@ Alle 63 Container haben explizite `mem_limit` in `docker-compose.macmini.yml`:
| Kategorie | Container | Budget |
|-----------|-----------|--------|
| Infrastructure | 6 | 1.712 MB |
| Forgejo | 2 | 768 MB |
| Forgejo (mirror-only) | 1 | 512 MB |
| Core (Hono/Bun) | 5 | 704 MB |
| Go Services | 5 | 384 MB |
| Other Backend | 3 | 576 MB |

View file

@ -1,49 +0,0 @@
#!/bin/bash
# Register Forgejo Runner on Mac Mini
# Run after Forgejo is up and admin user exists
set -e
DOCKER="${DOCKER_CMD:-/usr/local/bin/docker}"
FORGEJO_URL="http://localhost:3041"
FORGEJO_PUBLIC_URL="https://git.mana.how"
# Step 1: Get runner registration token from Forgejo API
echo "=== Getting runner registration token ==="
API_TOKEN=$(cat /Volumes/ManaData/forgejo-api-token 2>/dev/null || echo "")
if [ -z "$API_TOKEN" ]; then
echo "No API token found. Generate one:"
echo " $DOCKER exec --user git mana-core-forgejo forgejo admin user generate-access-token --username till --token-name runner-setup --scopes all"
echo " Save to: /Volumes/ManaData/forgejo-api-token"
exit 1
fi
RUNNER_TOKEN=$(curl -s -X POST "$FORGEJO_URL/api/v1/user/actions/runners/registration-token" \
-H "Authorization: token $API_TOKEN" | python3 -c "import sys,json; print(json.load(sys.stdin)['token'])")
echo "Runner token: $RUNNER_TOKEN"
# Step 2: Start runner container
echo ""
echo "=== Starting Forgejo Runner ==="
$DOCKER compose -f docker-compose.macmini.yml up -d forgejo-runner
# Step 3: Register runner
echo ""
echo "=== Registering runner ==="
sleep 5
$DOCKER exec mana-core-forgejo-runner forgejo-runner register \
--instance "$FORGEJO_PUBLIC_URL" \
--token "$RUNNER_TOKEN" \
--name "mac-mini" \
--labels "ubuntu-latest:docker://node:20,go:docker://golang:1.25-alpine,docker:docker://docker:dind" \
--no-interactive
# Step 4: Start runner daemon
echo ""
echo "=== Starting runner daemon ==="
$DOCKER restart mana-core-forgejo-runner
echo ""
echo "=== Runner registered and started ==="
echo "Check status: $FORGEJO_PUBLIC_URL/-/admin/runners"