v_1.5_patch_0.2

This commit is contained in:
jpmvaz
2026-09-13 20:12:28 +01:00
commit ab6a947493
62 changed files with 8674 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/bin/sh
# Container entrypoint for Martinhal DataHub.
# 1) make sure the persistent directories exist,
# 2) run the idempotent database initializer (creates schema + first admin),
# 3) hand off to the main process (node server.js).
set -e
# Resolve storage locations (fall back to the image defaults).
DB_FILE="${DB_PATH:-/app/data/datahub.db}"
DB_DIR="$(dirname "$DB_FILE")"
mkdir -p "$DB_DIR" "${UPLOAD_DIR:-/app/uploads}" "${BRAND_DIR:-/app/brand}" "${AVATAR_DIR:-/app/avatars}"
# init-db.js is safe to run on every start: it creates any missing tables and
# seeds the default email templates. It does NOT create the administrator —
# on first boot the site shows a setup wizard in the browser for that.
echo "[entrypoint] preparing database ..."
node init-db.js
echo "[entrypoint] starting: $*"
exec "$@"