From 46f423573009347fe8d7277eaba0930c271fd330 Mon Sep 17 00:00:00 2001 From: Eddasol Date: Thu, 2 Jan 2025 09:48:08 +0100 Subject: [PATCH] Add run_nginx check to see if file is found --- frontend/Dockerfile | 2 +- frontend/run_nginx.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 3c434c05..34a1407c 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -7,7 +7,7 @@ COPY . . RUN npm install RUN npm run build -FROM nginxinc/nginx-unprivileged:1.23-alpine +FROM nginxinc/nginx-unprivileged:1.27-alpine WORKDIR /app diff --git a/frontend/run_nginx.sh b/frontend/run_nginx.sh index e77fd918..64974977 100644 --- a/frontend/run_nginx.sh +++ b/frontend/run_nginx.sh @@ -1,5 +1,11 @@ #!/bin/bash # Substitute environment variables in the index.html file using the values in the current container environment + +# Check if index.html exists in the correct location +if [ ! -f /app/index.html ]; then + echo "Couldn't find index.html" +fi + envsubst ' ${VITE_AI_CONNECTION_STRING} ${VITE_BACKEND_URL}