9 lines
389 B
Bash
Executable File
9 lines
389 B
Bash
Executable File
#!/usr/bin/env bash
|
||
# Start the UnisOA API (schema bootstrap + seed run on boot).
|
||
# 本机开发:默认读测试档配置文件(config.toml + config.dev.toml)。
|
||
# 想临时换一档:OA_ENV=test ./scripts/dev-api.sh
|
||
set -euo pipefail
|
||
cd "$(dirname "$0")/.."
|
||
export OA_ENV="${OA_ENV:-dev}"
|
||
exec python3 -m uvicorn app.main:app --host "${OA_HOST:-0.0.0.0}" --port "${OA_PORT:-8000}"
|