FROM node:20-alpine AS client-build WORKDIR /client COPY client/package*.json ./ RUN npm ci COPY client/ ./ RUN npm run build FROM node:20-alpine WORKDIR /app ENV NODE_ENV=production RUN apk add --no-cache curl COPY server/package*.json ./ RUN npm ci --omit=dev COPY server/index.js ./ COPY server/fdk.js ./ COPY server/postgresFdkStorage.js ./ COPY server/config ./config # Includes protected and public platform routes such as routes/platformPublic.js. COPY server/routes ./routes COPY server/services ./services COPY --from=client-build /client/dist ./public EXPOSE 3001 CMD ["node", "index.js"]