FROM node:22-bookworm

WORKDIR /workspace

# package-lock.json is committed, so npm ci installs the exact dependency tree.
COPY package.json package-lock.json ./

RUN npm ci --no-audit --no-fund

COPY . .

# vinext/wrangler writes logs and registry state under .wrangler; the directory
# itself is git/dockerignored, so create it explicitly.
RUN mkdir -p /workspace/.wrangler

CMD ["npm", "run", "dev"]
