wance_data/scripts/start-dev.sh

18 lines
498 B
Bash
Raw Permalink Normal View History

2024-11-29 08:55:48 +00:00
#!/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"