File size: 445 Bytes
0e7a159
 
 
 
 
 
30db2e4
a7195dc
 
 
0e7a159
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash
set -euo pipefail
cd /app
export PYTHONPATH=/app
export PATH="${HOME}/.local/bin:${PATH}"

if [[ ! -f data/index/atlas.sqlite || ! -f data/index/mmap/rev_off.i32 ]]; then
  echo "FATAL: baked etymology index missing from image (data/index)." >&2
  echo "Publish artifacts/index.tar.zst and rebuild the Space image." >&2
  exit 1
fi

PORT="${PORT:-7860}"
exec python -m uvicorn backend.app:app --host 0.0.0.0 --port "${PORT}"