GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — java-web-app-docker/load-env.sh at master · Harish9395/java-web-app-docker Expand file tree/ Copy pathload-env.shMore file actions 39 lines (31 loc) · 788 Bytes / Copy pathload-env.shFile metadata and controls39 lines (31 loc) · 788 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 #!/bin/bash set -e CONFIG_FILE=/app/config/app.env mkdir -p /app/config update_env_file() { echo "Fetching latest config from AppConfig..." CONFIG_JSON=$(curl -s "$CONFIG_URL") # Parse JSON USERNAME=$(echo "$CONFIG_JSON" | jq -r '.username') LOG_LEVEL=$(echo "$CONFIG_JSON" | jq -r '.logLevel') FEATURE_FLAG=$(echo "$CONFIG_JSON" | jq -r '.featureFlag') # Write env file cat > $CONFIG_FILE <<EOF USERNAME=$USERNAME LOG_LEVEL=$LOG_LEVEL FEATURE_FLAG=$FEATURE_FLAG EOF # Export variables export USERNAME LOG_LEVEL FEATURE_FLAG echo "Updated app.env:" cat $CONFIG_FILE } # Initial load update_env_file # Optional: auto-refresh every 15 seconds while true; do sleep 15 update_env_file done & # Start Tomcat exec catalina.sh run |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |