# syntax=docker/dockerfile:1 # Shared Dockerfile for the 3 EDEN frontends (core-web, reseller-web, # subscriber-web). Parametrized by APP_NAME. Builds static assets with Vite, # serves them with nginx (SPA fallback to index.html — see nginx-spa.conf). FROM node:22-slim AS build RUN corepack enable WORKDIR /repo COPY . . RUN pnpm install --frozen-lockfile ARG APP_NAME RUN pnpm turbo run build --filter=@eden/${APP_NAME}... FROM nginx:1.27-alpine AS runtime ARG APP_NAME COPY infra/docker/nginx-spa.conf /etc/nginx/conf.d/default.conf COPY --from=build /repo/apps/${APP_NAME}/dist /usr/share/nginx/html EXPOSE 80