FROM node:20-alpine

WORKDIR /app

COPY package*.json ./
RUN npm install

COPY src ./src
COPY migrations ./migrations
COPY migrate-config.cjs ./
COPY run-migrations.cjs ./

EXPOSE 3001

CMD ["npm", "start"]
