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
This commit is contained in:
24
scripts/process-html.sh
Executable file
24
scripts/process-html.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user