managarten/scripts/mac-mini/setup-forgejo.sh
Till JS b1b9bbc269
Some checks are pending
CD Mac Mini / Detect Changes (push) Waiting to run
CD Mac Mini / Deploy (push) Blocked by required conditions
CI / Detect Changes (push) Waiting to run
CI / Validate (push) Waiting to run
CI / Build mana-search (push) Blocked by required conditions
CI / Build mana-sync (push) Blocked by required conditions
CI / Build mana-api-gateway (push) Blocked by required conditions
CI / Build mana-crawler (push) Blocked by required conditions
Docker Validate / Validate Dockerfiles (push) Waiting to run
Docker Validate / Build calendar-web (push) Blocked by required conditions
Docker Validate / Build quotes-web (push) Blocked by required conditions
Docker Validate / Build todo-backend (push) Blocked by required conditions
Docker Validate / Build todo-web (push) Blocked by required conditions
Docker Validate / Build mana-auth (push) Blocked by required conditions
Docker Validate / Build mana-sync (push) Blocked by required conditions
Docker Validate / Build mana-media (push) Blocked by required conditions
Mirror to Forgejo / Push to Forgejo (push) Waiting to run
chore: rename repo mana-monorepo → managarten
Phase-3-Rename des ehemaligen Multi-App-Monorepos zum eigenständigen
Produkt-Repo. Verein heißt mana e.V., Plattform-Domain bleibt mana.how,
apps/mana/ bleibt unverändert — nur der Repo-Container kriegt den
neuen Namen "managarten" (Garten der mana-Apps).

Geändert:
- package.json#name + #description
- README.md (Titel + erster Absatz)
- TROUBLESHOOTING.md
- alle Mac-Mini-Skripte (Pfade ~/projects/mana-monorepo → ~/projects/managarten)
- COMPOSE_PROJECT_NAME-default in scripts/mac-mini/status.sh
- .github/workflows/cd-macmini.yml + mirror-to-forgejo.yml
- apps/docs (astro.config.mjs + content)
- .claude/settings.local.json (Bash-Permission-Pfade)
- alle docs/*.md Pfad-Referenzen
- launchd plists, .env.macmini.example, infrastructure/

Forgejo-Repo + GitHub-Repo bereits via API umbenannt. Lokales
Verzeichnis-Rename + Mac-Mini-Cutover folgen separat.
2026-05-09 01:16:02 +02:00

62 lines
1.9 KiB
Bash
Executable file

#!/bin/bash
# Setup Forgejo on Mac Mini
# Run once after first deployment
set -e
DOCKER="${DOCKER_CMD:-/usr/local/bin/docker}"
COMPOSE="$DOCKER compose -f docker-compose.macmini.yml"
echo "=== 1. Create Forgejo database ==="
$DOCKER exec mana-infra-postgres psql -U postgres -c "CREATE DATABASE forgejo;" 2>/dev/null || echo "Database already exists"
echo ""
echo "=== 2. Create data directories ==="
sudo mkdir -p /Volumes/ManaData/forgejo /Volumes/ManaData/forgejo-runner
sudo chown -R 1000:1000 /Volumes/ManaData/forgejo
echo ""
echo "=== 3. Start Forgejo ==="
$COMPOSE up -d forgejo
echo "Waiting for Forgejo to start..."
sleep 15
echo ""
echo "=== 4. Check Forgejo health ==="
curl -s http://localhost:3041/api/v1/version | python3 -m json.tool
echo ""
echo "=== 5. Create admin user ==="
echo "Run this command to create the admin user:"
echo ""
echo " $DOCKER exec mana-core-forgejo forgejo admin user create \\"
echo " --admin --username till --password '<PASSWORD>' \\"
echo " --email till@mana.how"
echo ""
echo "=== 6. Register Forgejo Runner ==="
echo "After creating the admin user, get a runner token from:"
echo " https://git.mana.how/-/admin/runners"
echo ""
echo "Then register the runner:"
echo ""
echo " $DOCKER exec mana-core-forgejo-runner forgejo-runner register \\"
echo " --instance https://git.mana.how \\"
echo " --token <RUNNER_TOKEN> \\"
echo " --name mac-mini \\"
echo " --labels ubuntu-latest:docker://node:20,go:docker://golang:1.25-alpine"
echo ""
echo " $COMPOSE restart forgejo-runner"
echo ""
echo "=== 7. Mirror GitHub repo ==="
echo "After login, create a new migration at:"
echo " https://git.mana.how/repo/migrate"
echo " - Clone Address: https://github.com/Memo-2023/managarten.git"
echo " - Mirror: Yes"
echo " - Repository Name: managarten"
echo ""
echo "=== Setup complete ==="
echo "Forgejo: https://git.mana.how"
echo "Registration: disabled (admin-only)"
echo "SSH: port 2222"