#!/bin/sh # Injects runtime env vars into /usr/share/nginx/html/env.js # which is loaded by index.html before the React bundle. # Values come from Docker env vars (set via env_file in docker-compose.yml). set -e ENV_JS="/usr/share/nginx/html/env.js" cat > "$ENV_JS" < /tmp/nginx_default.conf cp /tmp/nginx_default.conf /etc/nginx/conf.d/default.conf exec nginx -g "daemon off;"