FROM node:22-slim # Toolchain para módulos nativos (better-sqlite3) y clonado de deps RUN apt-get update && apt-get install -y --no-install-recommends \ python3 make g++ git \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY package.json package-lock.json* ./ RUN npm install --production=false COPY . . RUN npm run build ENV PORT=3000 ENV NODE_ENV=production EXPOSE 3000 # Los datos persistentes (SQLite + imágenes/vídeos) llegan por volúmenes # montados en /app/data y /app/projects (ver mounts de Dokploy). CMD ["npm", "start"]