move repos into monorepo
This commit is contained in:
18
bin/supervisor/scripts/environment.sh
Executable file
18
bin/supervisor/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