From 1dbfabcaaf51022fd22a512477c6f9c4f576279f Mon Sep 17 00:00:00 2001 From: "Felix T.J. Dietrich" Date: Wed, 14 Aug 2024 00:21:23 +0200 Subject: [PATCH] replace url --- webapp/.storybook/tsconfig.json | 2 +- webapp/Dockerfile | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/webapp/.storybook/tsconfig.json b/webapp/.storybook/tsconfig.json index 7a27ccb1..84d7e742 100644 --- a/webapp/.storybook/tsconfig.json +++ b/webapp/.storybook/tsconfig.json @@ -5,7 +5,7 @@ "allowSyntheticDefaultImports": true, "resolveJsonModule": true }, - "exclude": ["../src/test.ts", "../src/**/*.spec.ts", "../src/environments/environment.production.ts"], + "exclude": ["../src/test.ts", "../src/**/*.spec.ts"], "include": ["../src/**/*.stories.*", "./preview.ts"], "files": ["./typings.d.ts"] } diff --git a/webapp/Dockerfile b/webapp/Dockerfile index 34d290f5..7edecdf0 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -6,7 +6,11 @@ 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 + 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 npm install RUN npm run build