This commit is contained in:
parent
51706d2d11
commit
853e99ca5f
21 changed files with 1402 additions and 77 deletions
18
scripts/run_prod.sh
Executable file
18
scripts/run_prod.sh
Executable 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue