pyex / Dockerfile
franyer24's picture
Update Dockerfile
39b765e verified
Raw
History Blame Contribute Delete
873 Bytes
FROM node:22-alpine
# Instalamos dependencias para Puppeteer (WhatsApp)
RUN apk update && apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
bash
# Configuración de Chrome para ahorrar RAM
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
WORKDIR /home/node/app
# Instalamos el servidor directamente desde NPM (ya viene compilado)
RUN npm install @wppconnect/server
# Configuramos variables de entorno
ENV PORT=7860
ENV HOST=0.0.0.0
ENV DB_TYPE=sqlite
ENV DB_DATABASE=/home/node/app/data/db.sqlite
ENV SECRET_KEY=MY_SUPER_SECRET_KEY
# Creamos la carpeta de datos
RUN mkdir -p /home/node/app/data && chmod 777 /home/node/app/data
EXPOSE 7860
# El binario instalado por NPM se encuentra en node_modules
CMD ["./node_modules/.bin/wppconnect-server"]