- 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
19 lines
479 B
Bash
Executable File
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
|