diff --git a/.github/workflows/manual-deploy-ten-gateway-frontend.yml b/.github/workflows/manual-deploy-ten-gateway-frontend.yml index 7babc25d67..e351465f46 100644 --- a/.github/workflows/manual-deploy-ten-gateway-frontend.yml +++ b/.github/workflows/manual-deploy-ten-gateway-frontend.yml @@ -123,7 +123,7 @@ jobs: - name: "Build and Push Docker Image" run: | DOCKER_BUILDKIT=1 docker build \ - --build-arg NEXT_PUBLIC_API_HOST_ENVIRONMENT="${{ github.event.inputs.testnet_type }}"" \ + --build-arg NEXT_PUBLIC_API_HOST_ENVIRONMENT="${{ github.event.inputs.testnet_type }}" \ --build-arg NEXT_PUBLIC_NETWORK_NAME="${{ env.NETWORK_NAME }}" \ --build-arg NEXT_PUBLIC_TENSCAN_URL="${{ env.TENSCAN_URL }}" \ --build-arg NEXT_PUBLIC_GATEWAY_URL="${{ env.GATEWAY_URL }}" \ diff --git a/tools/walletextension/frontend/Dockerfile b/tools/walletextension/frontend/Dockerfile index 341bf8efdf..95c722a985 100644 --- a/tools/walletextension/frontend/Dockerfile +++ b/tools/walletextension/frontend/Dockerfile @@ -1,9 +1,9 @@ # Use an official Node.js LTS version as a base image FROM node:20-alpine AS base + # Install pnpm RUN npm install -g pnpm - ARG NEXT_PUBLIC_NETWORK_NAME ARG NEXT_PUBLIC_TENSCAN_URL ARG NEXT_PUBLIC_GATEWAY_URL @@ -21,7 +21,7 @@ WORKDIR /usr/src/app COPY tools/walletextension/frontend/ . # Install dependencies -RUN pnpm ci +RUN pnpm install --frozen-lockfile # Build the Next.js app RUN pnpm run build @@ -29,6 +29,9 @@ RUN pnpm run build # Reduce the size of the final image by using a lighter base image FROM node:20-alpine AS runner +# Install pnpm +RUN npm install -g pnpm + # Set the working directory WORKDIR /usr/src/app @@ -36,10 +39,10 @@ WORKDIR /usr/src/app COPY --from=base /usr/src/app/.next ./.next COPY --from=base /usr/src/app/public ./public COPY --from=base /usr/src/app/package*.json ./ +COPY --from=base /usr/src/app/pnpm-lock.yaml ./ # Install production dependencies -RUN pnpm ci --production - +RUN pnpm install --prod --frozen-lockfile # Set the environment variables ENV PORT=80