Files
rxminder/scripts/process-html.sh
William Valentin 585c526a65 feat: Add APP_NAME env support for branding and deployment
- Make app name configurable via APP_NAME env variable - Update UI,
HTML, Docker, scripts, and k8s to use APP_NAME - Add process-html.sh for
template substitution - Document APP_NAME usage in
docs/APP_NAME_CONFIGURATION.md - Update Dockerfile, compose, and scripts
for dynamic naming - Add index.html.template for environment-based
branding
2025-09-07 12:21:44 -07:00

25 lines
610 B
Bash
Executable File

#!/bin/bash
# Process HTML template with environment variables
# This script substitutes environment variables in index.html.template
set -e
# Default values
APP_NAME="${APP_NAME:-RxMinder}"
# Input and output files
TEMPLATE_FILE="index.html.template"
OUTPUT_FILE="index.html"
# Check if template exists
if [[ ! -f "$TEMPLATE_FILE" ]]; then
echo "Error: Template file $TEMPLATE_FILE not found"
exit 1
fi
# Process template with environment variable substitution
envsubst '$APP_NAME' < "$TEMPLATE_FILE" > "$OUTPUT_FILE"
echo "✅ Processed $TEMPLATE_FILE -> $OUTPUT_FILE with APP_NAME=$APP_NAME"