diff --git a/webapp/Dockerfile b/webapp/Dockerfile index bd0c0bd8..0476ded6 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -5,14 +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) -RUN sed -i "s|\$COOLIFY_URL|$COOLIFY_URL_VALUE|g" .env -RUN APPLICATION_SERVER_URL=$(grep '^APPLICATION_SERVER_URL=' .env | cut -d '=' -f2) +RUN COOLIFY_URL_VALUE=$(grep '^COOLIFY_URL=' .env | cut -d '=' -f2) && \ + sed -i "s|\$COOLIFY_URL|$COOLIFY_URL_VALUE|g" .env # 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 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