diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..c164589 --- /dev/null +++ b/.env.development @@ -0,0 +1,19 @@ +# memberapi.ose.tw backend env (local development) +APP_ENV=development +PORT=8000 + +DB_HOST=127.0.0.1 +DB_PORT=54321 +DB_NAME=member_center +DB_USER=member_ose +DB_PASSWORD=CHANGE_ME + +AUTHENTIK_BASE_URL= +AUTHENTIK_ADMIN_TOKEN= +AUTHENTIK_VERIFY_TLS=false +AUTHENTIK_ISSUER= +AUTHENTIK_JWKS_URL= +AUTHENTIK_AUDIENCE= + +PUBLIC_FRONTEND_ORIGINS=http://127.0.0.1:5173,http://localhost:5173 +INTERNAL_SHARED_SECRET=CHANGE_ME diff --git a/README.md b/README.md index b587e39..c26e16b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ python -m venv .venv source .venv/bin/activate pip install -e . cp .env.example .env -uvicorn app.main:app --host 127.0.0.1 --port 8000 --reload +./scripts/start_dev.sh ``` ## Required DB setup diff --git a/scripts/start_dev.sh b/scripts/start_dev.sh new file mode 100755 index 0000000..7fa39aa --- /dev/null +++ b/scripts/start_dev.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd "$(dirname "$0")/.." +source .venv/bin/activate +exec uvicorn app.main:app --env-file .env.development --host 127.0.0.1 --port 8000 --reload