Añadir Dockerfile

This commit is contained in:
marsalva 2025-12-28 19:37:02 +00:00
parent 79e3c4fb31
commit 7931c89487
1 changed files with 24 additions and 0 deletions

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
# Usamos la imagen oficial de Playwright (incluye Node y navegadores)
FROM mcr.microsoft.com/playwright:v1.40.0-jammy
# Crear directorio de trabajo
WORKDIR /app
# Copiar archivos de dependencias
COPY package.json ./
# Instalar dependencias de Node
RUN npm install
# Instalar los navegadores necesarios de Playwright (solo Chromium para ahorrar espacio)
RUN npx playwright install chromium
# Copiar el resto del código (el robot y el html)
COPY . .
# Exponer el puerto (Render usa la variable PORT automáticamente)
ENV PORT=3000
EXPOSE 3000
# Comando de inicio
CMD ["node", "robot_cobros.js"]