Añadir Dockerfile
This commit is contained in:
parent
79e3c4fb31
commit
7931c89487
|
|
@ -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"]
|
||||
Loading…
Reference in New Issue