-
Notifications
You must be signed in to change notification settings - Fork 580
Expand file tree
/
Copy pathDockerfile.worker
More file actions
27 lines (20 loc) · 976 Bytes
/
Copy pathDockerfile.worker
File metadata and controls
27 lines (20 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Worker 24/7 do agent-engine (fusão Vendaval) — processo long-running fora do Next.
# Roda TS direto via tsx (sem build): o worker é I/O-bound e o cold start não importa.
# ponytail: imagem single-stage com devDeps (tsx precisa); multi-stage + prune é Fase 4.
FROM node:22-alpine
WORKDIR /app
# Procedência (doutrina de packaging, invariante 2).
LABEL org.opencontainers.image.source="https://github.com/melgarafael/DeskcommCRM" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.title="DeskcommCRM worker"
ARG APP_VERSION=dev
ENV APP_VERSION=$APP_VERSION
# pnpm fixado na versão do lockfile do repo (pnpm 10 bloquearia build scripts).
RUN corepack enable && corepack prepare [email protected] --activate
COPY package.json pnpm-lock.yaml ./
COPY patches ./patches
RUN pnpm install --frozen-lockfile
COPY . .
# Healthz do worker (bind 0.0.0.0 dentro do container).
EXPOSE 8787
CMD ["pnpm", "exec", "tsx", "workers/agent-worker/main.ts"]