wance_data/scripts/start-dev.sh
zhangjunping 1e920b29d0
Some checks failed
wance-data CI/CD / build (push) Failing after 44s
add scripts
2024-11-29 16:55:48 +08:00

18 lines
498 B
Bash

#!/usr/bin/env bash
set -e
DEFAULT_MODULE_NAME=src.main
MODULE_NAME=${MODULE_NAME:-$DEFAULT_MODULE_NAME}
VARIABLE_NAME=${VARIABLE_NAME:-app}
export APP_MODULE=${APP_MODULE:-"$MODULE_NAME:$VARIABLE_NAME"}
HOST=${HOST:-0.0.0.0}
PORT=${PORT:-8000}
LOG_LEVEL=${LOG_LEVEL:-info}
#LOG_CONFIG=${LOG_CONFIG:-/src/logging.ini}
LOG_CONFIG=${LOG_CONFIG:-./logging.ini}
# Start Uvicorn with live reload
exec uvicorn --reload --proxy-headers --host $HOST --port $PORT --log-config $LOG_CONFIG "$APP_MODULE"