-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70e581b
commit 8d66db6
Showing
5 changed files
with
124 additions
and
438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
npm-debug.log | ||
|
||
.wwebjs_auth | ||
.wwebjs_cache | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Usa una imagen base de Node.js 20 | ||
FROM node:20 | ||
|
||
# Establece el directorio de trabajo dentro del contenedor | ||
WORKDIR /app | ||
|
||
# Copia el package.json y el package-lock.json (si existe) | ||
COPY package*.json ./ | ||
|
||
# Instala las dependencias del proyecto | ||
RUN npm install | ||
|
||
# Instala las dependencias del sistema necesarias para Puppeteer | ||
RUN apt-get update && apt-get install -y \ | ||
wget \ | ||
ca-certificates \ | ||
fonts-liberation \ | ||
libappindicator3-1 \ | ||
libasound2 \ | ||
libatk-bridge2.0-0 \ | ||
libatk1.0-0 \ | ||
libcups2 \ | ||
libdbus-1-3 \ | ||
libdrm2 \ | ||
libgbm1 \ | ||
libnspr4 \ | ||
libnss3 \ | ||
libxcomposite1 \ | ||
libxdamage1 \ | ||
libxrandr2 \ | ||
xdg-utils \ | ||
chromium \ | ||
--no-install-recommends \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Verifica la ubicación del ejecutable de Chromium | ||
RUN which chromium | ||
|
||
# Establece variables de entorno necesarias para Puppeteer | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ | ||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium | ||
|
||
# Copia el resto del código de la aplicación | ||
COPY . . | ||
|
||
# Expone el puerto en el que la aplicación va a correr | ||
EXPOSE 3000 | ||
|
||
# Comando para ejecutar la aplicación | ||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.