All checks were successful
Trigger Cloudarix Deploy / call-webhook (push) Successful in 2s
25 lines
544 B
Docker
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"]
|