Files
flights_web/Dockerfile.remote
gnezim 9b1fb7388f Add Dockerfile.react and Dockerfile.remote for React build targets
Standalone SSR image (Node 24 slim) and remote MF static image (nginx alpine),
coexisting with legacy ASP.NET Dockerfile.
2026-04-15 00:53:36 +03:00

29 lines
596 B
Docker

# Dockerfile.remote — nginx-based static file server for remote MF artifact
# Stage 1: Install dependencies
FROM node:24-slim AS deps
WORKDIR /app
RUN corepack enable pnpm
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# Stage 2: Build remote target
FROM deps AS build
WORKDIR /app
COPY modern.config.ts module-federation.config.ts tsconfig.json ./
COPY src/ src/
RUN pnpm build:remote
# Stage 3: Serve static files with nginx
FROM nginx:alpine AS runtime
COPY --from=build /app/dist/remote/ /usr/share/nginx/html/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]