Skip to content

Commit

Permalink
update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed Aug 13, 2024
1 parent 1dbfabc commit 6bc198d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6bc198d

Please sign in to comment.