Added this stupid vibecoded app as a test
Build App / Build (push) Waiting to run

This commit is contained in:
2026-08-06 09:58:06 +02:00
parent d9e05fb487
commit a9860f4c94
51 changed files with 10154 additions and 7 deletions
@@ -0,0 +1,24 @@
#!/bin/sh
# Vite inlines import.meta.env.VITE_* at build time, so runtime configuration cannot
# come from an env var the app reads directly. Instead we write /config.js here, which
# src/app.html loads synchronously ahead of the bundle. One image, any environment.
set -eu
config_file=/usr/share/nginx/html/config.js
# Drop control characters (newlines included) so the value cannot break out of the
# string literal, then escape backslashes before double quotes. A URL containing
# & ? " or a trailing slash stays inert data.
value=$(printf '%s' "${LADOSE_API_BASE_URL:-}" | tr -d '\001-\037')
if [ -z "$value" ]; then
# Empty object, not an empty string: lets the app keep its baked-in default.
printf 'window.__LADOSE_CONFIG__ = {};\n' >"$config_file"
echo "config.js: LADOSE_API_BASE_URL unset, deferring to the built-in default" >&2
else
escaped=$(printf '%s' "$value" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')
printf 'window.__LADOSE_CONFIG__ = { apiBaseUrl: "%s" };\n' "$escaped" >"$config_file"
echo "config.js: apiBaseUrl=$value" >&2
fi
exec "$@"