kdsksdk
This commit is contained in:
parent
8be64a0f81
commit
d77d5724c3
56
Dockerfile
56
Dockerfile
@ -1,28 +1,46 @@
|
||||
FROM node:20
|
||||
FROM node:20-slim
|
||||
|
||||
# Installation des dépendances système nécessaires à sharp (et puppeteer)
|
||||
# Install system dependencies for Venom-bot, Puppeteer and Sharp
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libvips-dev \
|
||||
libnss3 \
|
||||
libatk-bridge2.0-0 \
|
||||
libxss1 \
|
||||
libasound2 \
|
||||
libgtk-3-0 \
|
||||
libgbm1 \
|
||||
libx11-xcb1 \
|
||||
libxcomposite1 \
|
||||
libxdamage1 \
|
||||
libxrandr2 \
|
||||
xdg-utils \
|
||||
--no-install-recommends && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
libvips-dev \
|
||||
libnss3 \
|
||||
libatk-bridge2.0-0 \
|
||||
libxss1 \
|
||||
libasound2 \
|
||||
libgtk-3-0 \
|
||||
libgbm1 \
|
||||
libx11-xcb1 \
|
||||
libxcomposite1 \
|
||||
libxdamage1 \
|
||||
libxrandr2 \
|
||||
xdg-utils \
|
||||
fonts-liberation \
|
||||
libappindicator3-1 \
|
||||
libnspr4 \
|
||||
lsb-release \
|
||||
wget \
|
||||
# Clean up
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install
|
||||
# Install Chromium manually (recommended approach for Venom-bot)
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
||||
|
||||
# Copy package files first for better layer caching
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
# Install project dependencies
|
||||
RUN yarn install --frozen-lockfile --production=false
|
||||
|
||||
# Copy application files
|
||||
COPY . .
|
||||
|
||||
# Expose the application port
|
||||
EXPOSE 3001
|
||||
CMD ["yarn", "start"]
|
||||
|
||||
# Start command
|
||||
CMD ["yarn", "start"]
|
||||
29
package.json
29
package.json
@ -1,10 +1,15 @@
|
||||
{
|
||||
"name": "baileys-whatsapp-api",
|
||||
"version": "1.0.0",
|
||||
"description": "API WhatsApp avec Baileys Pro",
|
||||
"main": "index.js",
|
||||
"name": "whatsapp-api-venom",
|
||||
"version": "2.0.1",
|
||||
"description": "API WhatsApp avec Venom-bot - Solution complète de messagerie",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"start": "node index.js"
|
||||
"start": "node server.js",
|
||||
"dev": "nodemon server.js",
|
||||
"test": "jest --coverage",
|
||||
"lint": "eslint .",
|
||||
"format": "prettier --write .",
|
||||
"postinstall": "node node_modules/venom-bot/dist/install/install-chromium.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"venom-bot": "^4.3.7",
|
||||
@ -16,5 +21,17 @@
|
||||
"winston": "^3.11.0",
|
||||
"axios": "^1.6.2",
|
||||
"puppeteer": "^21.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"jest": "^29.7.0",
|
||||
"nodemon": "^3.0.2",
|
||||
"prettier": "^3.1.1",
|
||||
"supertest": "^6.3.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=8.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user