# Production image: build the Angular app, serve the static bundle with # nginx, and reverse-proxy the API paths to the `webapi` compose service — # the same routing `proxy.conf.json` gives `ng serve` in development, so the # app's relative `/imports`, `/data`, ... calls work unchanged. FROM node:22-slim AS build WORKDIR /app COPY package.json package-lock.json* ./ RUN npm ci COPY . . RUN npx ng build --configuration production FROM nginx:1.27-alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/dist/WebApp/browser /usr/share/nginx/html EXPOSE 80