Files
hatchet/build/package/dashboard.dockerfile
Mohammed Nafees a0233964db New onboarding flow (#2757)
Updates the onboarding flow to make it CLI-based.
2026-01-16 10:09:44 -05:00

40 lines
1.0 KiB
Docker

# This expects the hatchet-lite image to be built and available on the machine
# -------------------
ARG HATCHET_API_IMAGE
# Stage 1: copy from the existing Go built image
FROM $HATCHET_API_IMAGE as api-binary-base
# Stage 2: build the frontend
FROM node:22-alpine as frontend-build
WORKDIR /app
COPY ./frontend/app/package.json ./frontend/app/pnpm-lock.yaml ./
RUN corepack pnpm@10.16.1 --version
RUN corepack pnpm@10.16.1 install --frozen-lockfile && corepack pnpm@10.16.1 store prune
COPY ./frontend/app ./
RUN npm run build
# Stage 3: run in nginx alpine image
FROM nginx:alpine
ARG APP_TARGET=client
COPY --from=api-binary-base /hatchet/hatchet-api ./hatchet-api
COPY ./build/package/dashboard-entrypoint.sh ./entrypoint.sh
COPY ./build/package/dashboard-nginx.conf /etc/nginx/nginx.conf
RUN rm -rf /usr/share/nginx/html/*
COPY --from=frontend-build /app/dist /usr/share/nginx/html
# Make entrypoint script executable
RUN chmod +x ./entrypoint.sh
EXPOSE 80
# Run the entrypoint script
CMD ["./entrypoint.sh"]