#!/bin/sh set -e # Template is in dist (copied by Dockerfile builder stage) TEMPLATE="/usr/share/nginx/html/env.js.template" TARGET="/usr/share/nginx/html/env.js" if [ -f "$TEMPLATE" ]; then echo "Generating env.js from template with API_BASE=${API_BASE:-/api}" # Default API_BASE to /api if not provided : ${API_BASE:=/api} cat > "$TARGET" < "$TARGET" <