From a012bea628b0b03e6ee96fa190777c040d4c8ae6 Mon Sep 17 00:00:00 2001 From: Ozeliurs Date: Tue, 8 Oct 2024 16:39:57 +0200 Subject: [PATCH] feat(docker-entrypoint.sh): add shebang and implement envsubst to enable environment variable substitution in nginx html files --- react-frontend/docker-entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/react-frontend/docker-entrypoint.sh b/react-frontend/docker-entrypoint.sh index 8c286d0..e844a3e 100644 --- a/react-frontend/docker-entrypoint.sh +++ b/react-frontend/docker-entrypoint.sh @@ -1,3 +1,5 @@ +#!/bin/env bash + for file in /usr/share/nginx/html/*; do if [ -f "$file" ]; then envsubst < "$file" > "$file.tmp" && mv "$file.tmp" "$file"