| 3e3af55 | | | 1 | # Grove Web UI Dockerfile |
| 3e3af55 | | | 2 | FROM node:22-alpine AS builder |
| 3e3af55 | | | 3 | |
| 3e3af55 | | | 4 | WORKDIR /app |
| 3e3af55 | | | 5 | COPY web/package.json web/package-lock.json* ./ |
| 3e3af55 | | | 6 | RUN npm install |
| 3e3af55 | | | 7 | |
| 3e3af55 | | | 8 | COPY web/ ./ |
| 25f3eee | | | 9 | RUN rm -f .env.local |
| 0d33405 | | | 10 | |
| f0bb192 | | | 11 | ARG GROVE_HUB_API_URL=http://localhost:4001 |
| f0bb192 | | | 12 | ARG GROVE_API_URL=http://localhost:4000 |
| 0d33405 | | | 13 | ENV GROVE_HUB_API_URL=$GROVE_HUB_API_URL |
| f0bb192 | | | 14 | ENV GROVE_API_URL=$GROVE_API_URL |
| 0d33405 | | | 15 | |
| 3e3af55 | | | 16 | RUN npm run build |
| 3e3af55 | | | 17 | |
| 3e3af55 | | | 18 | FROM node:22-alpine AS runner |
| 3e3af55 | | | 19 | WORKDIR /app |
| 3e3af55 | | | 20 | |
| 3e3af55 | | | 21 | COPY --from=builder /app/.next/standalone ./ |
| 3e3af55 | | | 22 | COPY --from=builder /app/.next/static ./.next/static |
| 3e3af55 | | | 23 | COPY --from=builder /app/public ./public |
| 3e3af55 | | | 24 | |
| 3e3af55 | | | 25 | ENV PORT=3000 |
| 32ba63d | | | 26 | ENV GROVE_HUB_API_URL=http://hub-api:4000 |
| 3e3af55 | | | 27 | EXPOSE 3000 |
| 3e3af55 | | | 28 | |
| 0b4b582 | | | 29 | COPY --from=builder /app/docker-entrypoint.sh ./docker-entrypoint.sh |
| 0b4b582 | | | 30 | RUN chmod +x docker-entrypoint.sh |
| 0b4b582 | | | 31 | |
| 0b4b582 | | | 32 | CMD ["./docker-entrypoint.sh"] |