FROM node:22-alpine AS build-step
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

FROM socialengine/nginx-spa:latest
COPY --from=build-step /app/dist /app
RUN chmod -R 777 /app