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
This commit is contained in:
18
scripts/environment.sh
Executable file
18
scripts/environment.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user