Changeset 0.7.0.13 (#38)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user