mirror of
https://github.com/ringhyacinth/Star-Office-UI
synced 2026-04-21 13:27:19 +00:00
Load project .env from backend run script
This commit is contained in:
parent
f321ee6f52
commit
88160bd755
1 changed files with 9 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue