Files
smueller 4fe25e6ec3
Some checks failed
CI / Node — lint, typecheck, test, build (push) Failing after 9s
CI / Go — node-agent tests (push) Failing after 22s
CI / Go — edge-gateway build (push) Successful in 13s
Phase0
2026-06-26 11:12:51 +02:00

32 lines
979 B
Docker

# syntax=docker/dockerfile:1
FROM node:22-alpine AS base
RUN corepack enable && corepack prepare pnpm@9.15.0 --activate
WORKDIR /app
FROM base AS builder
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml turbo.json ./
COPY packages packages
COPY apps/worker apps/worker
RUN pnpm install --frozen-lockfile
RUN pnpm --filter @hexahost/worker... build
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV WORKER_PORT=3002
COPY --from=builder /app/package.json ./
COPY --from=builder /app/pnpm-lock.yaml ./
COPY --from=builder /app/pnpm-workspace.yaml ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/packages ./packages
COPY --from=builder /app/apps/worker/dist ./apps/worker/dist
COPY --from=builder /app/apps/worker/package.json ./apps/worker/package.json
WORKDIR /app/apps/worker
EXPOSE 3002
HEALTHCHECK --interval=15s --timeout=5s --retries=3 \
CMD wget -qO- http://localhost:3002/health || exit 1
CMD ["node", "dist/index.js"]