tenantpilot/worker/Dockerfile
Ahmed Darrazi 2843281f2f
All checks were successful
Trigger Cloudarix Deploy / call-webhook (push) Successful in 2s
chore(worker): add Dockerfile and Dokploy README (build path: worker/)
2025-12-09 12:43:46 +01:00

25 lines
544 B
Docker

FROM node:20
# Create app directory
WORKDIR /usr/src/app
# Install dependencies first (copy package files)
COPY package.json package-lock.json ./
# Install full dependencies so `tsx` can run worker/index.ts
RUN npm ci --silent
# Copy only required directories to keep image smaller
COPY worker ./worker
COPY lib ./lib
COPY node_modules ./node_modules
COPY .env* ./
COPY tsconfig.json ./
ENV NODE_ENV=production
# Set working directory to repo root; worker is invoked by npm script
WORKDIR /usr/src/app
CMD ["npm", "run", "worker:start"]