Initial start-scripts commit
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="/home/azurian"
|
||||
APP_DIR="$ROOT_DIR/ffmppppeg-api"
|
||||
VENV_PYTHON="$ROOT_DIR/.venv/bin/python"
|
||||
HOST="${HOST:-0.0.0.0}"
|
||||
PORT="${PORT:-8022}"
|
||||
|
||||
if [[ ! -d "$APP_DIR" ]]; then
|
||||
echo "Application directory not found: $APP_DIR" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -x "$VENV_PYTHON" ]]; then
|
||||
echo "Python executable not found in virtualenv: $VENV_PYTHON" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$APP_DIR"
|
||||
|
||||
exec "$VENV_PYTHON" -m uvicorn main:app --host "$HOST" --port "$PORT"
|
||||
Reference in New Issue
Block a user