FROM node:24-slim

WORKDIR /app

ENV NODE_ENV=production
ENV PORT=3000
ENV BANGUMI_VAULT_FILES_DIR=/data/files

COPY package.json package-lock.json ./
RUN npm ci --omit=dev

COPY server ./server
COPY app ./app

RUN mkdir -p /data/files

EXPOSE 3000

CMD ["npm", "start"]
