Files
spark-all-start-scripts/start-convert.sh
T
2026-09-07 19:29:51 +00:00

23 lines
486 B
Bash
Executable File

#!/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"