# Build stage FROM --platform=linux/amd64 node:20-alpine as build WORKDIR /app # Essential build dependencies only RUN apk add --no-cache python3 make g++ curl git libc6-compat # Install dependencies from package.json COPY package*.json ./ RUN npm ci RUN npm install -g typescript # Build production assets COPY . . RUN npm run build # Production stage - static files only FROM nginx:alpine COPY --from=build /app/dist /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]