mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-19 03:03:18 +01:00
Run OSS Scanner image on Octane/FrankenPHP and bundle Gotenberg
Production runs as long-lived Octane workers in FrankenPHP worker mode, so state leaking between requests (static properties, singletons, ...) is a real risk that php artisan serve cannot reproduce. Base the scanner image on the production FrankenPHP image, add start-octane.sh (single worker, production Caddyfile) and describe this class of issue in the threat model. Bundle Gotenberg (Chromium only) so the PDF export tests pass offline and PDF rendering can be exercised.
This commit is contained in:
committed by
Constantin Graf
parent
6301b0f4a1
commit
0c58896b00
16
.oss-scanner/start-gotenberg.sh
Executable file
16
.oss-scanner/start-gotenberg.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Start the local Gotenberg server (PDF rendering) on 127.0.0.1:3000, matching GOTENBERG_URL in .env.ci.
|
||||
# Only the Chromium routes are needed by solidtime, see .oss-scanner/Dockerfile. Stop: kill "$(cat /tmp/gotenberg.pid)"
|
||||
set -euo pipefail
|
||||
|
||||
if ! curl -fs http://127.0.0.1:3000/health >/dev/null; then
|
||||
nohup gotenberg \
|
||||
--api-port=3000 \
|
||||
--libreoffice-disable-routes \
|
||||
--libreoffice-auto-start=false \
|
||||
--log-level=warn \
|
||||
>/tmp/gotenberg.log 2>&1 &
|
||||
echo $! >/tmp/gotenberg.pid
|
||||
until curl -fs http://127.0.0.1:3000/health >/dev/null; do sleep 0.5; done
|
||||
fi
|
||||
echo "Gotenberg is running on http://127.0.0.1:3000 (log: /tmp/gotenberg.log)"
|
||||
Reference in New Issue
Block a user