docker/Dockerfile.grove-webblame
View source
3e3af551# Grove Web UI Dockerfile
3e3af552FROM node:22-alpine AS builder
3e3af553
3e3af554WORKDIR /app
3e3af555COPY web/package.json web/package-lock.json* ./
0ed995b6COPY web/mermaid ./mermaid
3e3af557RUN npm install
3e3af558
3e3af559COPY web/ ./
25f3eee10RUN rm -f .env.local
0d3340511
f0bb19212ARG GROVE_HUB_API_URL=http://localhost:4001
f0bb19213ARG GROVE_API_URL=http://localhost:4000
0d3340514ENV GROVE_HUB_API_URL=$GROVE_HUB_API_URL
f0bb19215ENV GROVE_API_URL=$GROVE_API_URL
0d3340516
3e3af5517RUN npm run build
0b4b58218RUN npx esbuild server/collab-socket.ts --bundle --platform=node --outfile=dist/collab-socket.js --external:bufferutil --external:utf-8-validate
3e3af5519
3e3af5520FROM node:22-alpine AS runner
3e3af5521WORKDIR /app
3e3af5522
3e3af5523COPY --from=builder /app/.next/standalone ./
3e3af5524COPY --from=builder /app/.next/static ./.next/static
3e3af5525COPY --from=builder /app/public ./public
0b4b58226COPY --from=builder /app/dist/collab-socket.js ./collab-socket.js
0b4b58227COPY --from=builder /app/server/diagrams-default.json ./server/diagrams-default.json
3e3af5528
3e3af5529ENV PORT=3000
32ba63d30ENV GROVE_HUB_API_URL=http://hub-api:4000
3e3af5531EXPOSE 3000
0b4b58232EXPOSE 3334
3e3af5533
0b4b58234COPY --from=builder /app/docker-entrypoint.sh ./docker-entrypoint.sh
0b4b58235RUN chmod +x docker-entrypoint.sh
0b4b58236
0b4b58237CMD ["./docker-entrypoint.sh"]