Changeset 0.7.0.13 (#38)

This commit is contained in:
2026-02-21 13:53:36 +00:00
parent a95e246cd7
commit b72bfbb5b4
10 changed files with 42 additions and 20 deletions

View File

@@ -13,6 +13,12 @@ set -e
BASE_PATH="${BASE_PATH:-}"
# Read version from VERSION file (baked in at build time)
APP_VERSION="dev"
if [ -f /VERSION ]; then
APP_VERSION=$(cat /VERSION | tr -d '[:space:]')
fi
# Compute base href (needs trailing slash for <base> tag)
if [ -z "${BASE_PATH}" ]; then
BASE_HREF="/"
@@ -24,9 +30,10 @@ fi
sed -i \
-e "s|%%BASE_PATH%%|${BASE_PATH}|g" \
-e "s|%%BASE_HREF%%|${BASE_HREF}|g" \
-e "s|%%APP_VERSION%%|${APP_VERSION}|g" \
/usr/share/nginx/html/index.html
echo "✅ Frontend configured: BASE_PATH=${BASE_PATH:-/}"
echo "✅ Frontend configured: BASE_PATH=${BASE_PATH:-/} VERSION=${APP_VERSION}"
# ── Generate nginx config ───────────────────
# If BASE_PATH is set, serve under that prefix with alias.