Files
work-board/Dockerfile
T
zeekayandHanzo Dev 436a88e5f6 Zoo DAO work board: standalone repo + CI + k8s manifests
On-chain bounty kanban (Vite+React+viem static SPA) that reads the live
BountyV1/EscrowV1/ReputationV1 work-market on Zoo (chain 200200) directly
over the CORS-enabled JSON-RPC. Split out of luxfi/dao into its own repo so
CI builds a clean image.

- .github/workflows/docker.yml: canonical hanzoai/.github reusable build,
  bakes VITE_RPC_URL=https://api.zoo.network/v1/bc/C/rpc, pushes
  ghcr.io/luxfi/work-board:sha-<commit> on self-hosted arcd runners.
- k8s/: Deployment (2 replicas) + Service (80->3000) + Ingress
  (hanzoai/ingress class, host work.zoo.network, letsencrypt-prod).

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-16 20:31:29 -07:00

23 lines
856 B
Docker

# Multi-stage build for the Zoo DAO /work bounty board (static SPA).
# Built by CI (ARC + GHCR) — never `docker build` locally.
# VITE_RPC_URL is baked at build time; the board fetches the public, CORS-enabled
# Zoo RPC directly (access-control-allow-origin: * verified on api.zoo.network).
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --no-audit --no-fund
COPY . .
ARG VITE_RPC_URL=https://api.zoo.network/v1/bc/C/rpc
ENV VITE_RPC_URL=$VITE_RPC_URL
RUN npm run build
# Serve the static build with SPA fallback. No nginx/caddy — a minimal static server.
FROM node:22-alpine
WORKDIR /app
RUN npm i -g serve@14 && npm cache clean --force
COPY --from=build /app/dist ./dist
ENV PORT=3000
EXPOSE 3000
# -s: single-page-app rewrite to index.html; -l: listen port.
CMD ["sh", "-c", "serve -s dist -l ${PORT}"]