FROM node:20-alpine

WORKDIR /usr/src/app

# Copy package files
COPY package*.json ./

RUN npm install

# Copy everything from root
COPY . .

RUN npm run build

EXPOSE 4000

CMD ["node", "dist/server.js"]