From 6bc198d71cd23a133b26f2382519b1b3f5872d6d Mon Sep 17 00:00:00 2001 From: "Felix T.J. Dietrich" Date: Wed, 14 Aug 2024 00:24:24 +0200 Subject: [PATCH] update docker --- webapp/Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/webapp/Dockerfile b/webapp/Dockerfile index 7edecdf0..bd0c0bd8 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -5,12 +5,14 @@ WORKDIR /app COPY ./ /app/ # Fix buggy replacement of COOLIFY_URL in .env -RUN COOLIFY_URL_VALUE=$(grep '^COOLIFY_URL=' .env | cut -d '=' -f2) && \ - sed -i "s|\$COOLIFY_URL|$COOLIFY_URL_VALUE|g" .env && \ - APPLICATION_SERVER_URL=$(grep '^APPLICATION_SERVER_URL=' .env | cut -d '=' -f2) && \ - echo "Replacing serverUrl in environment.ts with: $APPLICATION_SERVER_URL" && \ - sed -i "s|serverUrl: '[^']*'|serverUrl: '$APPLICATION_SERVER_URL'|g" src/environments/environment.ts && \ - cat src/environments/environment.ts +RUN COOLIFY_URL_VALUE=$(grep '^COOLIFY_URL=' .env | cut -d '=' -f2) +RUN sed -i "s|\$COOLIFY_URL|$COOLIFY_URL_VALUE|g" .env +RUN APPLICATION_SERVER_URL=$(grep '^APPLICATION_SERVER_URL=' .env | cut -d '=' -f2) + +# Set serverUrl in environment.ts +RUN echo "Replacing serverUrl in environment.ts with: $APPLICATION_SERVER_URL" +RUN sed -i "s|serverUrl: '[^']*'|serverUrl: '$APPLICATION_SERVER_URL'|g" src/environments/environment.ts +RUN cat src/environments/environment.ts RUN npm install RUN npm run build