Skip to content

Commit

Permalink
Merge branch 'vt-digit-recognition-frontend' of github.com:gear-found…
Browse files Browse the repository at this point in the history
…ation/gear.exe-dapps into vt-digit-recognition-frontend
  • Loading branch information
vraja-nayaka committed Jan 17, 2025
2 parents b89b864 + bbce1d1 commit 0cc7368
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/CI-CD_digit-recognition-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ jobs:
push: true
build-args: |
NODE_ENV=${{ env.NODE_ENV }}
VITE_WALLET_CONNECT_PROJECT_ID=${{ env.VITE_WALLET_CONNECT_PROJECT_ID }}
VITE_GEAR_API_NODE=${{ env.VITE_GEAR_API_NODE }}
VITE_ETH_NODE_ADDRESS=${{ env.VITE_ETH_NODE_ADDRESS }}
VITE_CONTRACT_ADDRESS_DIGIT_RECOGNITION=${{ env.VITE_CONTRACT_ADDRESS_DIGIT_RECOGNITION }}
VITE_WALLET_CONNECT_PROJECT_ID=${{ secrets.VITE_WALLET_CONNECT_PROJECT_ID }}
VITE_GEAR_API_NODE=${{ secrets.VITE_GEAR_API_NODE }}
VITE_ETH_NODE_ADDRESS=${{ secrets.VITE_ETH_NODE_ADDRESS }}
VITE_CONTRACT_ADDRESS_DIGIT_RECOGNITION=${{ secrets.VITE_CONTRACT_ADDRESS_DIGIT_RECOGNITION }}
tags: ${{ needs.prepair.outputs.image_name }}

deploy-to-k8s:
Expand Down
24 changes: 7 additions & 17 deletions digit-recognition/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine AS builder
FROM node:18-alpine

WORKDIR /opt

Expand All @@ -10,31 +10,21 @@ RUN yarn install --frozen-lockfile

COPY . .

ARG VITE_WALLET_CONNECT_PROJECT_ID
ARG VITE_GEAR_API_NODE
ARG VITE_ETH_NODE_ADDRESS
ARG VITE_CONTRACT_ADDRESS_DIGIT_RECOGNITION
ARG VITE_WALLET_CONNECT_PROJECT_ID \
VITE_GEAR_API_NODE \
VITE_ETH_NODE_ADDRESS \
VITE_CONTRACT_ADDRESS_DIGIT_RECOGNITION

ENV VITE_WALLET_CONNECT_PROJECT_ID=${VITE_WALLET_CONNECT_PROJECT_ID} \
VITE_CONTRACT_ADDRESS_DIGIT_RECOGNITION=${VITE_CONTRACT_ADDRESS_DIGIT_RECOGNITION} \
VITE_GEAR_API_NODE=${VITE_GEAR_API_NODE} \
VITE_ETH_NODE_ADDRESS=${VITE_ETH_NODE_ADDRESS} \
DISABLE_ESLINT_PLUGIN=true

RUN yarn build && yarn cache clean


FROM node:18-alpine

WORKDIR /opt
RUN yarn build

RUN npm install --global serve

COPY --from=builder /opt/dist ./dist

ARG NODE_ENV
ENV NODE_ENV=${NODE_ENV}

EXPOSE 4173

CMD ["serve", "-s", "dist"]
CMD ["serve", "-s", "/opt/dist"]

0 comments on commit 0cc7368

Please sign in to comment.