Files
wiki-print/scripts/up_with_env.sh
T
2026-11-13 11:50:48 +01:00

19 lines
516 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Real Wiki.js connection details live outside the repository in a
# permission-protected file. Override the path with WIKI_PRINT_TEST_ENV.
ENV_FILE="${WIKI_PRINT_TEST_ENV:-.env}"
if [ -f "$ENV_FILE" ]; then
# shellcheck disable=SC1090
source "$ENV_FILE"
fi
if [ -z "${WIKI_URL:-}" ] || [ -z "${WIKI_API_KEY:-}" ]; then
echo "WIKI_URL and WIKI_API_KEY must be set (for example in $ENV_FILE)." >&2
exit 1
fi
export LOG_LEVEL="${LOG_LEVEL:-debug}"
exec ./scripts/up.sh