17 lines
414 B
Bash
Executable File
17 lines
414 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
source .venv/bin/activate
|
|
if [ -f ".env.development" ]; then
|
|
ENV_FILE=".env.development"
|
|
elif [ -f ".env" ]; then
|
|
ENV_FILE=".env"
|
|
else
|
|
echo "missing .env.development or .env. copy .env.example first."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Loading environment from '$ENV_FILE'"
|
|
exec uvicorn app.main:app --env-file "$ENV_FILE" --host 127.0.0.1 --port 8000 --reload
|