Use single .env for local startup

This commit is contained in:
Chris
2026-04-03 04:31:58 +08:00
parent 065f1d52f0
commit 7c4364b52f

View File

@@ -3,4 +3,9 @@ set -euo pipefail
cd "$(dirname "$0")/.." cd "$(dirname "$0")/.."
source .venv/bin/activate source .venv/bin/activate
exec uvicorn app.main:app --env-file .env.development --host 127.0.0.1 --port 8000 --reload ENV_FILE=".env"
if [ ! -f "$ENV_FILE" ]; then
echo "missing $ENV_FILE. copy .env.example to .env first."
exit 1
fi
exec uvicorn app.main:app --env-file "$ENV_FILE" --host 127.0.0.1 --port 8000 --reload