diff --git a/compose.yml b/compose.yml
index d19119e..9a59b86 100644
--- a/compose.yml
+++ b/compose.yml
@@ -190,6 +190,7 @@ services:
grampsweb:
image: ghcr.io/gramps-project/grampsweb:latest
+ restart: unless-stopped
ports:
- "8090:5000"
environment:
diff --git a/deploy-production/docker-compose.prod.yml b/deploy-production/docker-compose.prod.yml
index 32b6501..24b574e 100644
--- a/deploy-production/docker-compose.prod.yml
+++ b/deploy-production/docker-compose.prod.yml
@@ -123,56 +123,16 @@ services:
- GRAMPSWEB_ADMIN_EMAIL=${GRAMPSWEB_ADMIN_EMAIL}
- GRAMPSWEB_ADMIN_PASSWORD=${GRAMPSWEB_ADMIN_PASSWORD}
- GRAMPSWEB_TREE=${GRAMPSWEB_TREE:-Stiftung}
- - GRAMPSWEB_BASE_URL=${GRAMPSWEB_BASE_URL:-/}
+ - GRAMPSWEB_BASE_URL=${GRAMPSWEB_BASE_URL:-https://vhtv-stiftung.de/ahnenforschung}
- GRAMPSWEB_CELERY_CONFIG__broker_url=redis://redis:6379/0
- GRAMPSWEB_CELERY_CONFIG__result_backend=redis://redis:6379/0
- GRAMPSWEB_RATELIMIT_STORAGE_URI=redis://redis:6379/1
- GRAMPSWEB_NEW_DB_BACKEND=sqlite
- - GRAMPSWEB_SUBPATH=${GRAMPSWEB_SUBPATH:-/ahnenforschung}
command:
- sh
- -c
- |
- if [ -n "$$GRAMPSWEB_SUBPATH" ] && [ "$$GRAMPSWEB_SUBPATH" != "/" ]; then
- SUBPATH="$$GRAMPSWEB_SUBPATH"
- case "$$SUBPATH" in */) ;; *) SUBPATH="$${SUBPATH}/" ;; esac
- echo "[grampsweb] Patching static files for subpath $$SUBPATH ..."
- find / -name index.html -path "*/gramps*" -o -name index.html -path "*/static/*" 2>/dev/null | while read f; do
- if grep -q '' "$$f" 2>/dev/null; then
- sed -i "s|||g" "$$f"
- echo "[grampsweb] patched base href: $$f"
- fi
- done
- for f in /app/static/*.js; do
- if [ -f "$$f" ] && grep -q '/api/' "$$f" 2>/dev/null; then
- sed -i "s|\"/api/|\"$${SUBPATH}api/|g" "$$f"
- sed -i 's|`/api/|`'"$${SUBPATH}"'api/|g' "$$f"
- sed -i "s|\"/lang/|\"$${SUBPATH}lang/|g" "$$f"
- sed -i 's|`/lang/|`'"$${SUBPATH}"'lang/|g' "$$f"
- sed -i "s|\"/fonts/|\"$${SUBPATH}fonts/|g" "$$f"
- sed -i 's|`/fonts/|`'"$${SUBPATH}"'fonts/|g' "$$f"
- sed -i "s|\"/assets/|\"$${SUBPATH}assets/|g" "$$f"
- sed -i 's|`/assets/|`'"$${SUBPATH}"'assets/|g' "$$f"
- sed -i "s|location\.href=\"/\"|location.href=\"$$SUBPATH\"|g" "$$f"
- sed -i "s|document\.location\.href=\"/\"|document.location.href=\"$$SUBPATH\"|g" "$$f"
- echo "[grampsweb] patched JS paths: $$f"
- fi
- done
- if [ -f /app/static/sw.js ]; then
- sed -i "s|createHandlerBoundToURL(\"/index.html\")|createHandlerBoundToURL(\"$${SUBPATH}index.html\")|g" /app/static/sw.js
- SUBPATH_BS=$$(echo "$$SUBPATH" | sed "s|/|\\\\\\\\/|g")
- sed -i "s|\\^\\\\/api|\\^$${SUBPATH_BS}api|g" /app/static/sw.js
- echo "[grampsweb] patched sw.js navigation routes"
- fi
- find /app/static -name '*.css' 2>/dev/null | while read f; do
- if grep -q '\.\./fonts/' "$$f" 2>/dev/null; then
- sed -i "s|'../fonts/|'fonts/|g" "$$f"
- sed -i "s|\"../fonts/|\"fonts/|g" "$$f"
- echo "[grampsweb] patched CSS font paths: $$f"
- fi
- done
- echo "[grampsweb] Done."
- fi
+ # All subpath rewriting is handled by nginx sub_filter — no container patching needed.
echo "[grampsweb] Ensuring admin user exists ..."
python3 << 'PYEOF' 2>&1 | grep -v Gtk
from gramps_webapi.app import create_app