Hosting mit Coolify
Coolify übernimmt das Deployment und stellt die Webseite öffentlich bereit. Ein Webhook sorgt dafür, dass jeder Push automatisch einen neuen Build auslöst.
Neues Projekt in Coolify anlegen
Coolify → New Project → New Resource → Git Repository
Git URL: https://forge.repair.nrw/2TAP2B/stadtname-website.git
Branch: main
Build Pack: Nixpacks (oder Static, je nach Setup)
Für den Astro Static Build:
| Einstellung | Wert |
|---|---|
| Build Command | pnpm build |
| Publish Dir | dist |
| Port | 80 |
Port
Den Port explizit auf 80 setzen, sonst kommt die Seite nicht an.
Webhook für automatische Deploys
Webhook-URL aus Coolify kopieren
Coolify → Projekt → Settings → Webhooks → Webhook URL kopieren
Die URL sieht aus wie:
https://coolify.deine-domain.de/api/v1/webhooks/...
Webhook in Forgejo eintragen
Im Kundenprojekt-Repo:
https://forge.repair.nrw/2TAP2B/stadtname-website/settings/hooks
→ „Webhook hinzufügen" → Gitea
| Feld | Wert |
|---|---|
| URL | Coolify Webhook URL |
| Content-Type | application/json |
| Secret | Coolify Webhook Secret (aus Coolify Settings) |
| Trigger | Push-Events |
| Branch | main |
Speichern – ab jetzt löst jeder git push origin main automatisch einen Coolify-Deploy aus.
Deployment testen
git commit --allow-empty -m "test: trigger deploy"
git push
Im Coolify-Dashboard sollte innerhalb weniger Sekunden ein neuer Build starten.