Skip to content
Merged
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
10 changes: 10 additions & 0 deletions .github/workflows/gke-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,13 @@ jobs:
tags: |
${{ env.REGISTRY }}/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/bundler:${{ steps.tag.outputs.version }}
${{ env.REGISTRY }}/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/bundler:latest

- name: Build and push web image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.web
push: true
tags: |
${{ env.REGISTRY }}/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/web:${{ steps.tag.outputs.version }}
${{ env.REGISTRY }}/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/web:latest
24 changes: 24 additions & 0 deletions Dockerfile.web
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM node:22-slim AS base
RUN corepack enable && corepack prepare pnpm@10.32.1 --activate
WORKDIR /app

FROM base AS deps
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY packages/web/package.json packages/web/
RUN pnpm install --frozen-lockfile --filter @agent-paymaster/web

FROM base AS build
COPY --from=deps /app ./
COPY packages/web packages/web
RUN pnpm --filter @agent-paymaster/web build

FROM node:22-slim AS runtime
WORKDIR /app
COPY --from=build /app/packages/web/.next/standalone ./
COPY --from=build /app/packages/web/.next/static ./packages/web/.next/static
COPY --from=build /app/packages/web/public ./packages/web/public
USER node
EXPOSE 3000
ENV PORT=3000 HOSTNAME="0.0.0.0" NODE_ENV=production
HEALTHCHECK --interval=30s --timeout=5s CMD node -e "fetch('http://localhost:3000').then((r) => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))"
CMD ["node", "packages/web/server.js"]
4 changes: 3 additions & 1 deletion packages/web/next.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { NextConfig } from "next";

const nextConfig: NextConfig = {};
const nextConfig: NextConfig = {
output: "standalone",
};

export default nextConfig;
Empty file added packages/web/public/.gitkeep
Empty file.
Loading