ReliefLensDemo / scripts /start_hf_space.sh
IngSeb0's picture
Add Docker Space frontend proxy
1bcdb25
Raw
History Blame Contribute Delete
428 Bytes
#!/usr/bin/env bash
set -e
: "${BACKEND_ORIGIN:=http://129.212.185.232:8080}"
echo "[INFO] Using BACKEND_ORIGIN=${BACKEND_ORIGIN}"
envsubst '${BACKEND_ORIGIN}' < /etc/nginx/templates/nginx.space.conf.template > /etc/nginx/conf.d/default.conf
cd /app/frontend
echo "[INFO] Starting Next.js frontend on 127.0.0.1:3000"
npx next start -H 127.0.0.1 -p 3000 &
echo "[INFO] Starting nginx on 0.0.0.0:7860"
nginx -g "daemon off;"