Adds bin/dev.sh — a self-bootstrapping dev server script for preauth, following the same pattern as vital-pulse, penny-track, and mcp-server.
Features
Port 8773 (mnemonic: P-R-E = 7-7-3) → https://preauth.lyra-dev.devgnome.com
Self-bootstrapping start: Installs PHP 8.4 + extensions (including APCu, which is critical for nonce cache, rate limiter, and session storage), Composer, and project dependencies if missing. Survives terminal resets/reboots.
APCu CLI support: Automatically enables apc.enable_cli=1 in the APCu ini (matches the Dockerfile's console.ini), so console commands like backup code generation work.
No database needed: preauth uses APCu + filesystem cache exclusively — no migrations to run
Sets APP_SHARE_DIR: Points to var/share for filesystem session persistence (matches franken.sh dev pattern)
Subcommands: start | stop | status | restart
PID file management: var/.dev-server.pid for process tracking, var/log/dev-server.log for logs
Verification
Full end-to-end test — APCu was not previously installed:
✅start — Installed php8.4-apcu, enabled CLI support, cleared cache, started PHP server
✅Login page rendering — curl http://localhost:8773/ returns HTTP 401 with the preauth login form HTML (correct behavior — preauth intercepts and returns 401 with the login page)
✅status — Shows PID, URL, dev URL, log path
✅stop — Graceful shutdown, PID file cleaned
✅pytest — 293 tests, 605 assertions, all pass
✅php-cs-fixer — 0 issues across 63 files
Files Changed
bin/dev.sh (new, executable)
## Summary
Adds `bin/dev.sh` — a self-bootstrapping dev server script for preauth, following the same pattern as vital-pulse, penny-track, and mcp-server.
## Features
- **Port 8773** (mnemonic: P-R-E = 7-7-3) → `https://preauth.lyra-dev.devgnome.com`
- **Self-bootstrapping `start`**: Installs PHP 8.4 + extensions (including **APCu**, which is critical for nonce cache, rate limiter, and session storage), Composer, and project dependencies if missing. Survives terminal resets/reboots.
- **APCu CLI support**: Automatically enables `apc.enable_cli=1` in the APCu ini (matches the Dockerfile's `console.ini`), so console commands like backup code generation work.
- **No database needed**: preauth uses APCu + filesystem cache exclusively — no migrations to run
- **Sets `APP_SHARE_DIR`**: Points to `var/share` for filesystem session persistence (matches `franken.sh` dev pattern)
- **Subcommands**: `start | stop | status | restart`
- **PID file management**: `var/.dev-server.pid` for process tracking, `var/log/dev-server.log` for logs
## Verification
Full end-to-end test — APCu was not previously installed:
1. ✅ **start** — Installed `php8.4-apcu`, enabled CLI support, cleared cache, started PHP server
2. ✅ **Login page rendering** — `curl http://localhost:8773/` returns HTTP 401 with the preauth login form HTML (correct behavior — preauth intercepts and returns 401 with the login page)
3. ✅ **status** — Shows PID, URL, dev URL, log path
4. ✅ **stop** — Graceful shutdown, PID file cleaned
5. ✅ **pytest** — 293 tests, 605 assertions, all pass
6. ✅ **php-cs-fixer** — 0 issues across 63 files
## Files Changed
- `bin/dev.sh` (new, executable)
Manages a local PHP dev server for end-to-end development and testing.
Binds to 0.0.0.0:8773, accessible via Caddy at
https://preauth.lyra-dev.devgnome.com.
Features:
- Self-bootstrapping: installs PHP 8.4 + extensions (including APCu,
which is critical for nonce cache, rate limiter, and session storage),
Composer, and project dependencies if missing. Survives terminal
resets/reboots.
- Enables apc.enable_cli=1 for console commands (matches Dockerfile)
- Subcommands: start, stop, status, restart
- Sets APP_SHARE_DIR to var/share for filesystem session persistence
- Clears dev cache on start
No database needed — preauth uses APCu + filesystem cache exclusively.
Port assignment: P-R-E = 7-7-3 → 8773
andrew
approved these changes 2026-08-13 15:41:39 -04:00
andrew
merged commit c7585e720a into main2026-08-13 15:42:59 -04:00
andrew
deleted branch feature/dev-server-script2026-08-13 15:42:59 -04:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Adds
bin/dev.sh— a self-bootstrapping dev server script for preauth, following the same pattern as vital-pulse, penny-track, and mcp-server.Features
https://preauth.lyra-dev.devgnome.comstart: Installs PHP 8.4 + extensions (including APCu, which is critical for nonce cache, rate limiter, and session storage), Composer, and project dependencies if missing. Survives terminal resets/reboots.apc.enable_cli=1in the APCu ini (matches the Dockerfile'sconsole.ini), so console commands like backup code generation work.APP_SHARE_DIR: Points tovar/sharefor filesystem session persistence (matchesfranken.shdev pattern)start | stop | status | restartvar/.dev-server.pidfor process tracking,var/log/dev-server.logfor logsVerification
Full end-to-end test — APCu was not previously installed:
php8.4-apcu, enabled CLI support, cleared cache, started PHP servercurl http://localhost:8773/returns HTTP 401 with the preauth login form HTML (correct behavior — preauth intercepts and returns 401 with the login page)Files Changed
bin/dev.sh(new, executable)