added ftp controlservice health check and fixed gallery js error

This commit is contained in:
Codex Agent
2025-12-04 21:03:03 +01:00
parent a5b4feb57e
commit 82bfe68ce0
3 changed files with 53 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ The control service is a lightweight sidecar responsible for provisioning vsftpd
- **Scheme:** Bearer token.
- **Header:** `Authorization: Bearer ${PHOTOBOOTH_CONTROL_TOKEN}`.
- **Timeout:** Configurable via `PHOTOBOOTH_CONTROL_TIMEOUT` (default 5s).
- **Token generation:** `openssl rand -hex 32` (or `php -r "echo bin2hex(random_bytes(32)), "`); store in `.env`/Dokploy secrets as `PHOTOBOOTH_CONTROL_TOKEN`.
## Endpoints
@@ -43,6 +44,8 @@ Implementation tips:
- Apply the rate limit token-bucket before writing to disk (or integrate with HAProxy).
- Store `expires_at` and automatically disable the account when reached (in addition to Laravels scheduled cleanup).
Reference implementation (current stack): `photobooth-ftp` builds from `docker/photobooth-control`, starts pure-ftpd and a Node-based control API on port 8080. Healthcheck: `GET /health` on 8080 (wired in docker-compose.dokploy.yml). Rate-limit/expiry enforcement inside the FTP tier is still to be implemented.
### `POST /users/{username}/rotate`
```json