Zum Hauptinhalt springen

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:

EinstellungWert
Build Commandpnpm build
Publish Dirdist
Port80
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
FeldWert
URLCoolify Webhook URL
Content-Typeapplication/json
SecretCoolify Webhook Secret (aus Coolify Settings)
TriggerPush-Events
Branchmain

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.