Add worktree sandbox and test env workflow
This commit is contained in:
@@ -23,6 +23,37 @@ Diese Demo zeigt eine HUD-artige Navigation mit statischem Hauptmenü, kontextab
|
||||
2. `php -S localhost:8000 -t web/desktop/public` (setzt die Dokumentenwurzel auf den Desktop-Build).
|
||||
3. Öffne `http://localhost:8000/index.php` und wechsle z. B. über `?s=build&p=demolish` die Sections oder wechsle mit `-t web/mobile/public` zur mobilen Variante.
|
||||
|
||||
## Worktree-Sandbox (Docker)
|
||||
Die Sandbox ist eine getrennte Working-Copy via `git worktree`. Docker laeuft nur dort, damit Logs/Uploads/DB-Volumes das Hauptverzeichnis nicht verschmutzen.
|
||||
|
||||
### Init (einmalig)
|
||||
- `bash scripts/worktree-init.sh`
|
||||
- Optionaler Pfad: `bash scripts/worktree-init.sh ../mein-sandbox-pfad`
|
||||
|
||||
### Start (Up)
|
||||
- `bash scripts/worktree-up.sh`
|
||||
- Optionaler Pfad: `bash scripts/worktree-up.sh ../mein-sandbox-pfad`
|
||||
|
||||
### Sync (nur Code, ohne Commit)
|
||||
- `bash scripts/worktree-sync.sh`
|
||||
- Wendet auf Wunsch uncommitted Aenderungen aus dem Haupt-Worktree per Patch an.
|
||||
|
||||
### Stop (Down)
|
||||
- `bash scripts/worktree-down.sh`
|
||||
|
||||
### Entfernen (Destroy)
|
||||
- `bash scripts/worktree-destroy.sh`
|
||||
|
||||
Hinweise:
|
||||
- Standardpfad ist `../galaxyforge-sandbox` (relativ zum Repo-Root).
|
||||
- Lege eine `.env` nur in der Sandbox an. Sie wird nicht committet.
|
||||
- Verwende `.env.example` als Vorlage und aendere die Platzhalter vor Prod.
|
||||
|
||||
### Testumgebung starten (inkl. DB, Migrations, Seed)
|
||||
- `bash scripts/test-env-up.sh`
|
||||
- Erstellt die Sandbox bei Bedarf, startet Docker, legt eine lokale `.env` in der Sandbox an und startet den PHP-Server.
|
||||
- Stoppen: `CTRL+C` im Terminal, danach optional `bash scripts/worktree-down.sh`.
|
||||
|
||||
## Hinweise
|
||||
- Die PHP-Session (`session_start()`) im Entry-Point dient Flash-Toasts und Alert-Messages.
|
||||
- Die Partial-Templates erwarten die Variablen `$section`, `$sub`, `$planet` und greifen über `$partialsPath` aus `web/desktop/public/index.php` aufeinander zu.
|
||||
|
||||
Reference in New Issue
Block a user