#!/bin/sh # Render /config.js from the env var API_URL at container start. # Runs as part of the official nginx:alpine /docker-entrypoint.d sequence, # so nginx itself is launched by the upstream entrypoint after this script. set -e : "${API_URL:=/api/v1}" export API_URL envsubst < /etc/nginx/templates/config.js.template > /usr/share/nginx/html/config.js echo "[config] API_URL=${API_URL} -> /config.js"