Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ jobs:
tags: |
${{ env.HARBOR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tag }}
${{ env.HARBOR_REGISTRY }}/${{ env.IMAGE_NAME }}:latest
build-args: |
VITE_GRAPHQL_ENDPOINT=${{ secrets.VITE_GRAPHQL_ENDPOINT }}

update-helm:
runs-on: [self-hosted, macOS, ARM64]
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ COPY package.json ./
RUN npm install --omit=dev

FROM node:20-alpine AS build-env
ARG VITE_GRAPHQL_ENDPOINT
ENV VITE_GRAPHQL_ENDPOINT=$VITE_GRAPHQL_ENDPOINT
ENV VITE_GRAPHQL_ENDPOINT=__GRAPHQL_ENDPOINT_PLACEHOLDER__
COPY . /app/
COPY --from=development-dependencies-env /app/node_modules /app/node_modules
WORKDIR /app
Expand All @@ -22,4 +21,4 @@ COPY package.json ./
COPY --from=production-dependencies-env /app/node_modules /app/node_modules
COPY --from=build-env /app/build /app/build
EXPOSE 3000
CMD ["npx", "-y", "serve", "-s", "build/client", "-l", "3000"]
CMD sh -c "find /app/build/client -name '*.js' -exec sed -i \"s|__GRAPHQL_ENDPOINT_PLACEHOLDER__|$VITE_GRAPHQL_ENDPOINT|g\" {} + && npx -y serve -s build/client -l 3000"