Skip to content

Commit

Permalink
ITEM-391 Ajout placeholder pour item Maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelQuetin committed Nov 27, 2024
1 parent 4a681a3 commit 65325b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Paramètres par défaut du conteneur
export ITEM_FRONT_API_BASEURL=${ITEM_FRONT_API_BASEURL:='http://localhost:8081/'}
export ITEM_FRONT_IDREF_API_URL=${ITEM_FRONT_IDREF_API_URL:='http://localhost:8081/'}
export ITEM_FRONT_MAINTENANCE=${ITEM_FRONT_MAINTENANCE:='false'}


# Remplace les placeholders dans le code généré en prod
Expand All @@ -19,6 +20,9 @@ sed -i \
sed -i \
"s#ITEM_PLACEHOLDER_VITE_IDREF_API_URL#${ITEM_FRONT_IDREF_API_URL}#g" \
/usr/share/nginx/html/assets/*
sed -i \
"s#ITEM_PLACEHOLDER_VITE_MAINTENANCE#${ITEM_FRONT_MAINTENANCE}#g" \
/usr/share/nginx/html/assets/*

# execute nginx (cf CMD dans Dockerfile)
exec "$@"
1 change: 1 addition & 0 deletions docker/vuejs_env_placeholder
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
# et éviter ainsi d'avoir une URL de l'API en static dans l'image docker
VITE_API_URL=ITEM_PLACEHOLDER_VITE_API_URL
VITE_API_URL_IDREF=ITEM_PLACEHOLDER_VITE_IDREF_API_URL
VITE_MAINTENANCE=ITEM_PLACEHOLDER_VITE_MAINTENANCE

0 comments on commit 65325b2

Please sign in to comment.