FROM node:22-alpine AS build

WORKDIR /app

COPY package*.json /app

RUN npm install

COPY . /app

RUN npm run build

FROM node:22-alpine AS prod

WORKDIR /app

COPY --from=build /app/.output /app/.output

ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3000

EXPOSE 3000 

CMD ["node", ".output/server/index.mjs"] 