FROM node:25.6.1 AS base

RUN npm i -g pnpm

FROM base AS primary

WORKDIR /app

COPY package.json pnpm-lock.yaml pnpm-workspace.yaml turbo.json ./

COPY packages/settings packages/settings
COPY packages/db packages/db

RUN pnpm install

COPY scripts scripts

CMD ["/bin/sh", "/app/scripts/migrate.sh"]
