From addd36a869783e05dc3bed7a6db91ac39fb701e2 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Date: Fri, 10 Apr 2026 19:37:27 +0200 Subject: [PATCH] fix(docker): create .env file in Dockerfile instead of copying - Create .env file with RUN echo instead of COPY - .env is in .gitignore so cannot be copied --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ce047ee..c8a9997 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,15 +7,14 @@ ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 ENV CYPRESS_INSTALL_BINARY=0 ENV NODE_ENV=production -# Set API URL for build -ENV GATEWAY_URL=http://localhost:9100 +# Set API URL for build (create .env file) +RUN echo "GATEWAY_URL=http://localhost:9100" > .env # Install build dependencies RUN apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib/apt/lists/* # Copy package files COPY package*.json ./ -COPY .env ./ # Install dependencies RUN npm ci --legacy-peer-deps --prefer-offline --no-audit