diff --git a/backend/run.sh b/backend/run.sh index 57c12b6..04bb840 100755 --- a/backend/run.sh +++ b/backend/run.sh @@ -1,4 +1,13 @@ #!/usr/bin/env bash set -euo pipefail ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +# Auto-load project env file when present. +if [[ -f "$ROOT_DIR/.env" ]]; then + set -a + # shellcheck disable=SC1091 + source "$ROOT_DIR/.env" + set +a +fi + exec "$ROOT_DIR/.venv/bin/python" "$ROOT_DIR/backend/app.py"