Skip to content

Commit

Permalink
fix: update replace string to not replace key in files
Browse files Browse the repository at this point in the history
  • Loading branch information
98jan committed Dec 25, 2024
1 parent 6424501 commit 85236d3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions frontend/spa/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
FROM node:18 AS build

# General
ENV VITE_TITLE="VITE_TITLE"
ENV VITE_GENERAL_DATE_FORMAT="VITE_GENERAL_DATE_FORMAT"
ENV VITE_GENERAL_CURRENCY_SYMBOL_AFTER="VITE_GENERAL_CURRENCY_SYMBOL_AFTER"
ENV VITE_KEYCLOAK_URL="VITE_KEYCLOAK_URL"
ENV VITE_KEYCLOAK_REALM="VITE_KEYCLOAK_REALM"
ENV VITE_KEYCLOAK_CLIENT_ID="VITE_KEYCLOAK_CLIENT_ID"
ENV VITE_API_URL="VITE_API_URL"
ENV VITE_TITLE="VITE_TITLE_VALUE"
ENV VITE_GENERAL_DATE_FORMAT="VITE_GENERAL_DATE_FORMAT_VALUE"
ENV VITE_GENERAL_CURRENCY_SYMBOL_AFTER="VITE_GENERAL_CURRENCY_SYMBOL_AFTER_VALUE"
ENV VITE_KEYCLOAK_URL="VITE_KEYCLOAK_URL_VALUE"
ENV VITE_KEYCLOAK_REALM="VITE_KEYCLOAK_REALM_VALUE"
ENV VITE_KEYCLOAK_CLIENT_ID="VITE_KEYCLOAK_CLIENT_ID_VALUE"
ENV VITE_API_URL="VITE_API_URL_VALUE"

# Set the working directory
WORKDIR /app
Expand Down
14 changes: 7 additions & 7 deletions frontend/spa/docker/replaceEnvs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

# Define a key-value map for search and replace strings
declare -A STRING_MAP
STRING_MAP["VITE_TITLE"]=$VITE_TITLE
STRING_MAP["VITE_GENERAL_DATE_FORMAT"]=$VITE_GENERAL_DATE_FORMAT
STRING_MAP["VITE_GENERAL_CURRENCY_SYMBOL_AFTER"]=$VITE_GENERAL_CURRENCY_SYMBOL_AFTER
STRING_MAP["VITE_KEYCLOAK_URL"]=$VITE_KEYCLOAK_URL
STRING_MAP["VITE_KEYCLOAK_REALM"]=$VITE_KEYCLOAK_REALM
STRING_MAP["VITE_KEYCLOAK_CLIENT_ID"]=$VITE_KEYCLOAK_CLIENT_ID
STRING_MAP["VITE_API_URL"]=$VITE_API_URL
STRING_MAP["VITE_TITLE_VALUE"]=$VITE_TITLE
STRING_MAP["VITE_GENERAL_DATE_FORMAT_VALUE"]=$VITE_GENERAL_DATE_FORMAT
STRING_MAP["VITE_GENERAL_CURRENCY_SYMBOL_AFTER_VALUE"]=$VITE_GENERAL_CURRENCY_SYMBOL_AFTER
STRING_MAP["VITE_KEYCLOAK_URL_VALUE"]=$VITE_KEYCLOAK_URL
STRING_MAP["VITE_KEYCLOAK_REALM_VALUE"]=$VITE_KEYCLOAK_REALM
STRING_MAP["VITE_KEYCLOAK_CLIENT_ID_VALUE"]=$VITE_KEYCLOAK_CLIENT_ID
STRING_MAP["VITE_API_URL_VALUE"]=$VITE_API_URL

# Specify the relative directory where you want to perform the replacement
RELATIVE_DIRECTORY="./build"
Expand Down

0 comments on commit 85236d3

Please sign in to comment.