15 lines
324 B
Bash
15 lines
324 B
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
# Start uvicorn server with application srv:energyDB
|
||
|
|
|
||
|
|
ENERGY_DB_CONF=./energyDB.conf
|
||
|
|
|
||
|
|
if [ -f $ENERGY_DB_CONF ]; then
|
||
|
|
. energyDB.conf
|
||
|
|
fi
|
||
|
|
|
||
|
|
ARG_HTTP_PORT=${HTTP_PORT:-8000}
|
||
|
|
ARG_IP_ADDRESS=${IP_ADDRESS:-127.0.0.1}
|
||
|
|
|
||
|
|
/usr/bin/env uvicorn --port $ARG_HTTP_PORT --host $ARG_IP_ADDRESS ${UVICORN_ARGS} srv:energyDB
|