- 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
25 lines
610 B
Bash
Executable File
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"
|