File size: 428 Bytes
1bcdb25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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;"