diff --git a/backend-transit/Dockerfile b/backend-transit/Dockerfile new file mode 100644 index 0000000..227fffc --- /dev/null +++ b/backend-transit/Dockerfile @@ -0,0 +1,36 @@ +FROM node:22-alpine AS builder + +WORKDIR /app + +# Copy package files +COPY package*.json ./ + +# Install dependencies +RUN npm install + +# Copy source code +COPY . . + +# Build the NestJS application +RUN npm run build + +# --- + +FROM node:22-alpine AS runtime + +WORKDIR /app + +ENV NODE_ENV=production + +# Copy package files for production install +COPY package*.json ./ + +# Install only production dependencies +RUN npm install --omit=dev + +# Copy compiled code from builder +COPY --from=builder /app/dist ./dist + +EXPOSE 4020 + +CMD ["node", "dist/main.js"]