#!/bin/sh

for file in /app/static/assets/*.js
do
  sed -i 's|ENV_KC_REALM|'${VITE_KC_REALM}'|g' $file
  sed -i 's|ENV_KC_URL|'${VITE_KC_URL}'|g' $file
  sed -i 's|ENV_CLIENTID_KEYCLOAK|'${VITE_CLIENTID_KEYCLOAK}'|g' $file
done

node ./dist/app.js
