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