20 lines
476 B
Bash
Executable File
20 lines
476 B
Bash
Executable File
#!/bin/bash
|
|
cd /home
|
|
if [ $# -eq 0 ]; then
|
|
uvicorn --host "0.0.0.0" --port "8000" inse.main:app --log-config log-config.yaml
|
|
else
|
|
if [ "$1" = "run" ]; then
|
|
shift
|
|
uvicorn --host "0.0.0.0" --port "8000" inse.main:app --log-config log-config.yaml "$@"
|
|
elif [ "$1" = "test" ]; then
|
|
shift
|
|
pytest "$@"
|
|
else
|
|
echo "Usage: entrypoint.sh [run|test] <parameters>"
|
|
echo
|
|
echo "run: Runs the app in a uvicorn web server."
|
|
echo "test: Runs tests using pytest."
|
|
fi
|
|
fi
|
|
|