restaurant-admin-web/docker/40-runtime-config.sh

12 lines
416 B
Bash
Executable File

#!/bin/sh
set -eu
cat > /usr/share/nginx/html/runtime-config.js <<EOT
window.__APP_CONFIG__ = {
API_BASE_URL: "${API_BASE_URL:-http://localhost:8080}",
THALOS_AUTH_BASE_URL: "${THALOS_AUTH_BASE_URL:-${API_BASE_URL:-http://localhost:8080}}",
THALOS_DEFAULT_RETURN_URL: "${THALOS_DEFAULT_RETURN_URL:-http://localhost:23480/config}",
THALOS_DEFAULT_TENANT_ID: "${THALOS_DEFAULT_TENANT_ID:-demo-tenant}"
};
EOT