8cdde429f5d7702738e72f521d82adf4d14374d7
Scaffold nginx + deploy-hook stack for playground.schwenk.online, Gitea cursor workflow, directory-based public/ content, and boka bootstrap via git clone. Co-authored-by: Cursor <cursoragent@cursor.com>
playground
Experimentier-Site auf playground.schwenk.online: statisches HTML, Inhalte per @cursor in Gitea-Issues, Auto-Deploy per Push-Webhook.
Wie es funktioniert
- Issue in Gitea öffnen, z. B. „Onepager: Thema XY“
- Kommentar:
@cursor recherchiere zu Thema XY und generiere einen Onepager als plain HTML - Gitea Action (cursor-gitea-agent) committet nach
public/<slug>/aufmain - Push-Webhook triggert
git pullim Container-Stack → nginx liefert die Seite aus
Content-Konventionen: siehe SOUL.md.
Repo-Layout
public/ # Webroot
nginx/ # nginx-Konfiguration
hooks/ # Webhook-Skripte + hooks.json.template
deploy-hook/ # Dockerfile für Webhook-Container (git pull)
compose.yml # nginx + deploy-hook auf Traefik-Netz
Auf boka ist /home/frank/playground.schwenk.online ein Git-Clone dieses Repos.
Gitea (einmalig)
cursor-Bot als Collaborator zum Repo hinzufügen- Repo-Secrets (Namen ohne
GITEA_-Prefix):CURSOR_API_KEY— Cursor API keyCURSOR_BOT_TOKEN— Gitea API token descursor-Users
- Push-Webhook (Repo → Einstellungen → Webhooks):
- URL:
https://playground.schwenk.online/hooks/deploy - Content type:
application/json - Event: Push
- Secret: gleicher Wert wie
WEBHOOK_SECRETin.envauf boka
- URL:
boka Bootstrap (einmalig)
Automatisch (von Arch-Dev-Rechner):
./scripts/bootstrap-boka.sh
Erzeugt .env mit zufälligem WEBHOOK_SECRET (Wert in der Ausgabe — für Gitea-Webhook eintragen).
Manuell: ssh frank-schwenk.de
App-Verzeichnis (Compose + Config)
git clone ssh://git@gitea.schwenk.online:2222/froxxxy/playground.git
/home/frank/playground.schwenk.online
cd /home/frank/playground.schwenk.online
cp .env.example .env
WEBHOOK_SECRET, DEPLOY_GIT_TOKEN, HOST_UID/HOST_GID eintragen
docker compose up -d --build
(Manueller Pfad endet oben bei `docker compose up -d --build`.)
**Deploy-Token:** In Gitea einen read-only Token anlegen (oder dedizierten Deploy-User), nur für `git pull` im Container.
DNS: `playground.schwenk.online` → boka (A-Record).
## Lokaler Smoke-Test (optional)
Ohne Traefik — nur prüfen ob nginx die leere `public/` ausliefert:
```bash
docker run --rm -p 8080:80 \
-v "$(pwd)/public:/usr/share/nginx/html:ro" \
-v "$(pwd)/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro" \
-v "$(pwd)/nginx/security-headers.conf:/etc/nginx/conf.d/security-headers.conf:ro" \
nginx
# curl -s -o /dev/null -w "%{http_code}" http://localhost:8080/ → 404 (kein index.html, erwartet)
Manuelles Deploy (Fallback)
ssh frank-schwenk.de
cd /home/frank/playground.schwenk.online
git pull
docker compose up -d
Beispiel-URL nach erstem Onepager
https://playground.schwenk.online/thema-xy/ — wenn Cursor public/thema-xy/index.html angelegt hat.
Description
Languages
HTML
96.4%
Shell
2.9%
JavaScript
0.6%
Dockerfile
0.1%