chore: add local development env files and startup script

This commit is contained in:
Chris
2026-03-29 23:34:34 +08:00
parent c84d7286a1
commit 06d78fbec2
3 changed files with 26 additions and 1 deletions

19
.env.development Normal file
View File

@@ -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

View File

@@ -8,7 +8,7 @@ python -m venv .venv
source .venv/bin/activate source .venv/bin/activate
pip install -e . pip install -e .
cp .env.example .env cp .env.example .env
uvicorn app.main:app --host 127.0.0.1 --port 8000 --reload ./scripts/start_dev.sh
``` ```
## Required DB setup ## Required DB setup

6
scripts/start_dev.sh Executable file
View File

@@ -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