Prepare deployment and Forgejo CI
Some checks failed
CI / check (push) Failing after 8s

This commit is contained in:
kacper 2026-04-14 20:17:29 -04:00
parent 51706d2d11
commit 853e99ca5f
21 changed files with 1402 additions and 77 deletions

18
scripts/run_prod.sh Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${root_dir}"
host="${HOST:-0.0.0.0}"
port="${PORT:-8000}"
if [[ ! -f "${root_dir}/frontend/dist/index.html" ]]; then
echo "frontend/dist/index.html is missing. Build the frontend before starting production." >&2
exit 1
fi
exec python3 -m uvicorn app:app \
--host "${host}" \
--port "${port}" \
--proxy-headers