FROM node:18-alpine

WORKDIR /usr/src/app

# install deps
COPY package*.json ./
RUN npm install

# copy sources and build
COPY . .
RUN npm run build

ENV NODE_ENV=production
EXPOSE 3000
CMD ["node", "dist/main.js"]
