chore: add local development env files and startup script
This commit is contained in:
19
backend/.env.development
Normal file
19
backend/.env.development
Normal 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
|
||||
@@ -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
|
||||
|
||||
6
backend/scripts/start_dev.sh
Executable file
6
backend/scripts/start_dev.sh
Executable 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
|
||||
Reference in New Issue
Block a user