FROM node:20-bookworm-slim

# Tools needed to compile better-sqlite3
RUN apt-get update \
 && apt-get install -y --no-install-recommends python3 make g++ ca-certificates tzdata \
 && rm -rf /var/lib/apt/lists/*

# Run as the node user (uid 1000) — already exists in node images
USER node
WORKDIR /app

EXPOSE 3000

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