Skip to content

Commit

Permalink
🔨 Init bash runner
Browse files Browse the repository at this point in the history
  • Loading branch information
agn-7 committed Nov 8, 2023
1 parent b948b66 commit 66edbaa
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions start_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -eu

host=0.0.0.0
port=8000

get_absolute_path() {
cd "$(dirname "$1")" && pwd -P
}

cd "$(get_absolute_path "$0")" || exit 1

[[ "${HOST:-}" ]] && host="${HOST}"
[[ "${PORT:-}" ]] && port="${PORT}"
poetry run alembic upgrade head
poetry run uvicorn --host "${host}" --port "${port}" --reload ifsguid.main:app

0 comments on commit 66edbaa

Please sign in to comment.