No description
  • JavaScript 50.3%
  • PHP 27.1%
  • CSS 17.6%
  • HTML 5%
Find a file
mrouissi 4fc974ff98
All checks were successful
CI / lint (push) Successful in 2s
Deploy / deploy (push) Successful in 2s
fix(heatmap): legend keys reflect only kinds actually shown as cells (a worked absence day adds no key)
2026-07-13 17:21:45 +02:00
.forgejo/workflows ci: add Forgejo Actions pipelines (php/js lint + in-place deploy) 2026-07-06 09:13:43 +02:00
app/www chore: initial import of timedb-php app (api/app/web vhosts) 2026-07-02 17:07:26 +02:00
notes chore: remove pipeline smoke-test file 2026-07-06 13:28:12 +02:00
web/www fix(heatmap): legend keys reflect only kinds actually shown as cells (a worked absence day adds no key) 2026-07-13 17:21:45 +02:00
.gitignore docs: add README documenting the app + CI/CD infrastructure 2026-07-06 09:33:59 +02:00
README.md docs: add README documenting the app + CI/CD infrastructure 2026-07-06 09:33:59 +02:00

timedb-php

Schlanke PHP-+-Supabase-App, ausgeliefert als drei vHosts (timedb-api/app/web.bamsenet.de) aus /home/timedb/{app,web}/www auf bnet006. Das Frontend (web/www) spricht mit Supabase über einen serverseitigen PHP-Proxy (web/www/php/supabase.php), damit der API-Key nie im Browser landet.

Aufbau

Pfad Was es ist
web/www/ Haupt-App - HTML/CSS/JS + der Supabase-PHP-Proxy
app/www/ vHost timedb-app
api/www/ vHost timedb-api
.forgejo/workflows/ CI/CD-Pipelines
ops/ (nur Server) deploy.sh - das In-Place-Deploy-Skript

Infrastruktur

Es gibt keinen Build-Schritt - reines PHP/JS/CSS. Der Clou ist das Deploy-Modell.

Git-in-Place: Das Repo ist direkt im Live-Docroot ausgecheckt (/home/timedb auf bnet006). Die Produktionsdateien sind der Working-Tree, ein Deploy ist also nur git reset --hard origin/main - kein Artefakt, kein Kopieren.

CI/CD (Forgejo Actions):

  • ci.yaml - lintet jeden Push/PR: php -l + ESM node --check.
  • deploy.yaml - bei Push auf main wird automatisch deployt.
  Push auf main
      │
      ▼
┌──────────────────────────┐       SSH (Forced-Command-Key)
│  Runner (Container auf     │  ──────────────────────────────►  timedb@bnet006
│  bnet006, CPU/RAM-limitiert)│                                  führt ops/deploy.sh aus
│   • php -l / node --check  │                                        │
│   • stößt Deploy an        │                                        ▼
└──────────────────────────┘                             git reset --hard origin/main
                                                          (Live-Docroot aktualisiert)

Warum so gebaut (Sicherheit):

  • Der Runner ist ein ressourcenlimitierter Container, damit CI nie ungesandboxt auf der geteilten Produktionsmaschine läuft und die anderen Dienste (Supabase, KillBill, ...) nicht ausbremsen kann.
  • Das Deploy nutzt einen Forced-Command-SSH-Key (DEPLOY_SSH_KEY, ein Forgejo-Secret), der genau eine Sache kann - ops/deploy.sh als timedb ausführen. Kein weiterer Zugriff auf die Maschine.
  • Keine Secrets auf der Platte; der Deploy-Key liegt in Forgejo und wird nur in den Deploy-Job injiziert.

Entwicklung

Klonen, bearbeiten, committen, auf main pushen - CI lintet und die Änderung wird automatisch deployt. Fertig.

git clone ssh://forgejo@git.b-net.cloud/Apps/timedb-php.git