Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -0,0 +1,14 @@
\set ON_ERROR_STOP on
-- The credential normalizer requires this database-level marker in addition
-- to process and URL guards. A loopback SSH tunnel to staging does not carry
-- the marker and therefore cannot trigger the disposable local reset.
DO $local_database_marker$
BEGIN
EXECUTE format(
'ALTER DATABASE %I SET app.local_dev_credentials = %L',
current_database(),
'enabled'
);
END
$local_database_marker$;
@@ -10,16 +10,20 @@
#
# Nutzung: bash scripts/dev/local.sh
# Dann: http://app.localhost:3000 (admin: http://admin.localhost:3000)
set -uo pipefail
set -euo pipefail
# Repo-Root (zwei Ebenen ueber dieser Datei)
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$ROOT"
# Node 22.12.0 via fnm (falls vorhanden)
# Use the repository-pinned Node version via fnm when available.
if command -v fnm >/dev/null 2>&1; then
eval "$(fnm env)"
fnm use 22.12.0 >/dev/null 2>&1 || true
node_version="$(tr -d '[:space:]' < .nvmrc)"
if ! fnm use "${node_version#v}" >/dev/null 2>&1; then
echo "FEHLER: Node ${node_version} aus .nvmrc ist lokal nicht installiert." >&2
exit 1
fi
fi
# Env laden: zuerst .env (SOPS-pull), dann .env.local (lokale Overrides gewinnen)
@@ -35,6 +39,20 @@ if [ -z "${DATABASE_URL:-}" ]; then
exit 1
fi
# Canonical disposable local credentials. The credential command additionally
# checks the local DB marker before any password or permission write.
if [ -n "${NODE_ENV:-}" ] && [ "$NODE_ENV" != "development" ]; then
echo "FEHLER: pnpm dev:local akzeptiert nur NODE_ENV=development." >&2
exit 1
fi
export NODE_ENV=development
export LOCAL_DEV_CREDENTIALS=1
export ADMIN_FALLBACK_LOGIN_ENABLED=true
export ADMIN_FALLBACK_LOGIN_EMAILS=admin@email.com
export DEMO_USER=admin@email.com:password
pnpm dev:local:credentials
# Lokales Redis (BullMQ / Session-Cache) sicherstellen
if ! nc -z localhost 6379 >/dev/null 2>&1; then
docker start hg-redis >/dev/null 2>&1 \
@@ -42,5 +60,5 @@ if ! nc -z localhost 6379 >/dev/null 2>&1; then
|| echo "WARN: konnte Redis nicht starten (BullMQ/Session-Cache evtl. eingeschraenkt)." >&2
fi
echo "Lokaler Dev-Server: http://app.localhost:3000 (admin: http://admin.localhost:3000)"
echo "Lokaler Dev-Server: http://app.localhost:3000 (admin: http://admin.localhost:3000; Login: admin@email.com / password)"
exec pnpm dev
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$ROOT"
# Deliberately target only this repository's Docker Compose Postgres service.
# Never follow DATABASE_URL here: it might point through a tunnel.
docker compose -f docker-compose.yml -f docker-compose.dev.yml exec -T postgres \
sh -eu -c 'exec psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d "$POSTGRES_DB"' \
< scripts/dev/init-local-database.sql
echo "Marked the repository Docker Postgres database as disposable local development data."