fix: Adjust Dockerfile COPY paths for worker/ build context
All checks were successful
Trigger Cloudarix Deploy / call-webhook (push) Successful in 1s

This commit is contained in:
Ahmed Darrazi 2025-12-09 13:48:51 +01:00
parent 51a76ef944
commit 024c5fca00

View File

@ -1,16 +1,16 @@
### Multi-stage build: compile TypeScript in a builder image, produce a smaller runtime image
### IMPORTANT: Set Dokploy build path to "/" (repo root), NOT "worker/"
### Dockerfile path should be "worker/Dockerfile"
### IMPORTANT: Dokploy will set build context to worker/ directory automatically
### All COPY paths must be relative to worker/ (use ../ to access parent repo root)
FROM node:20 AS builder
WORKDIR /usr/src/app
# Copy package manifests and install all deps (including dev) for build
COPY package.json package-lock.json ./
# Copy package manifests from parent directory and install all deps (including dev) for build
COPY ../package.json ../package-lock.json ./
RUN npm ci --silent
# Copy project files and compile TypeScript output to `dist/`
COPY . .
# Copy entire project from parent directory and compile TypeScript
COPY ../ .
# Try to compile the project; if there is no TS config for worker, keep files as-is
RUN npx tsc -p tsconfig.json --outDir dist || echo "tsc exit code ignored"
@ -18,7 +18,7 @@ FROM node:20-alpine AS runner
WORKDIR /usr/src/app
# Install only production dependencies
COPY package.json package-lock.json ./
COPY ../package.json ../package-lock.json ./
RUN npm ci --production --silent
# Copy compiled output from builder (if present) and essential runtime files