This repository has been archived on 2025-11-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
supervisor/scripts/environment.sh
Timur Gordon 609af6ec15 Refactor supervisor to use environment variables and simplify binary
- Created scripts/generate_secret.sh to generate supervisor secrets
- Added .env.example with all configuration options
- Created scripts/environment.sh to load env vars from .env
- Updated scripts/run.sh to use env vars and pass as flags
- Simplified supervisor binary:
  - Removed bootstrap-admin-key and config file support
  - Made admin-secret required
  - Minimal output (only URLs)
  - Clean startup with no verbose logging
- Updated .gitignore for .env and log files
2025-11-07 00:08:32 +01:00

19 lines
479 B
Bash
Executable File

#!/bin/bash
# Load environment variables from .env file
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
PROJECT_DIR=$(cd "$SCRIPT_DIR/.." && pwd)
ENV_FILE="$PROJECT_DIR/.env"
if [ -f "$ENV_FILE" ]; then
# Export variables from .env file
set -a
source "$ENV_FILE"
set +a
echo "✅ Loaded environment from .env"
else
echo "⚠️ No .env file found at $ENV_FILE"
echo " Copy .env.example to .env and configure your settings"
exit 1
fi