From e7877d49ab99acd4958012d969b46a684cc9a1c8 Mon Sep 17 00:00:00 2001 From: David Chang Date: Sat, 21 Sep 2024 12:18:19 -0400 Subject: [PATCH] fix: Don't overwrite if one exists --- docker/nginx/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/nginx/Dockerfile b/docker/nginx/Dockerfile index 04fa04dca..d50aca7a0 100644 --- a/docker/nginx/Dockerfile +++ b/docker/nginx/Dockerfile @@ -8,7 +8,9 @@ COPY common /common WORKDIR /frontend # Point frontend at the correct URL to communicate with the backend -RUN echo "NEXT_PUBLIC_BACKEND_URL=http://localhost:80" > /frontend/.env.local +RUN if ! grep -q "^NEXT_PUBLIC_BACKEND_URL=" /frontend/.env /frontend/.env.local 2>/dev/null; then \ + echo "NEXT_PUBLIC_BACKEND_URL=http://localhost:80" > /frontend/.env.local; \ +fi # install npm RUN apk add --update npm