From e15ef5d00763a2509bc7ccf8d87e218a85a69614 Mon Sep 17 00:00:00 2001 From: synt-xerror <169557594+synt-xerror@users.noreply.github.com> Date: Tue, 21 Apr 2026 12:11:12 -0300 Subject: [PATCH] add docker support and update repository urls --- Dockerfile | 32 ++++++++++++++++++++++++++++ README.md | 2 +- docker-compose.yml | 15 +++++++++++++ docs/INSTALACAO.md | 50 ++++++++++++++++++++++++++++++++++++++++++-- docs/INSTALLATION.md | 50 ++++++++++++++++++++++++++++++++++++++++++-- 5 files changed, 144 insertions(+), 5 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..58012c1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +FROM node:20-slim + +# Install dependencies for Puppeteer/Chrome +RUN apt-get update && apt-get install -y \ + chromium \ + chromium-sandbox \ + fonts-ipafont-gothic \ + fonts-wqy-zenhei \ + fonts-thai-tlwg \ + fonts-kacst \ + fonts-freefont-ttf \ + libxss1 \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + +# Set environment variables for Puppeteer +ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ + PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium + +WORKDIR /app + +# Copy package files and install dependencies +COPY package*.json ./ +RUN npm install --omit=dev + +# Copy application files +COPY . . + +# Create necessary directories +RUN mkdir -p session logs + +CMD ["node", "src/main.js"] diff --git a/README.md b/README.md index 16eaf00..1ff2441 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Adicione o número **+55 (16) 99459-1903** aos seus contatos e envie `!many` par ```bash # 1. Clone o repositório -git clone https://github.com/synt-xerror/manybot +git clone https://git.maneos.net/synt-xerror/manybot cd manybot # 2. Crie o arquivo de configuração diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d19e0f7 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3.8' + +services: + manybot: + build: . + container_name: manybot + volumes: + - ./session:/app/session + - ./manybot.conf:/app/manybot.conf:ro + - ./src/plugins:/app/src/plugins + environment: + - NODE_ENV=production + stdin_open: true + tty: true + restart: unless-stopped diff --git a/docs/INSTALACAO.md b/docs/INSTALACAO.md index efce707..6c27b5d 100644 --- a/docs/INSTALACAO.md +++ b/docs/INSTALACAO.md @@ -6,18 +6,64 @@ Guia completo de instalação do ManyBot em diferentes plataformas. ## 📑 Índice +- [Docker](#docker) (Recomendado) - [Linux](#linux) - [Windows](#windows) - [Termux (Android)](#termux-android) --- +## Docker + +A maneira mais fácil e recomendada de rodar o ManyBot. + +### Pré-requisitos + +- [Docker](https://docs.docker.com/get-docker/) +- [Docker Compose](https://docs.docker.com/compose/install/) + +### Instalação + +```bash +# 1. Clone o repositório +git clone https://git.maneos.net/synt-xerror/manybot +cd manybot + +# 2. Crie o arquivo de configuração +cp manybot.conf.example manybot.conf +nano manybot.conf + +# 3. Inicie com Docker +docker-compose up -d + +# 4. Veja os logs para escanear o QR Code +docker-compose logs -f +``` + +**Escaneie o QR Code** que aparecerá nos logs. + +### Comandos úteis + +```bash +# Ver logs +docker-compose logs -f + +# Parar o bot +docker-compose down + +# Atualizar +git pull +docker-compose up --build -d +``` + +--- + ## Linux ### 1. Clone o repositório ```bash -git clone https://github.com/synt-xerror/manybot +git clone https://git.maneos.net/synt-xerror/manybot cd manybot ``` @@ -105,7 +151,7 @@ pkg update && pkg upgrade pkg install nodejs git # Clone e instale -git clone https://github.com/synt-xerror/manybot +git clone https://git.maneos.net/synt-xerror/manybot cd manybot ``` diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index 9a20404..4f1770d 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -6,18 +6,64 @@ Complete installation guide for ManyBot on different platforms. ## Index +- [Docker](#docker) (Recommended) - [Linux](#linux) - [Windows](#windows) - [Termux (Android)](#termux-android) --- +## Docker + +The easiest and recommended way to run ManyBot. + +### Prerequisites + +- [Docker](https://docs.docker.com/get-docker/) +- [Docker Compose](https://docs.docker.com/compose/install/) + +### Installation + +```bash +# 1. Clone the repository +git clone https://git.maneos.net/synt-xerror/manybot +cd manybot + +# 2. Create the configuration file +cp manybot.conf.example manybot.conf +nano manybot.conf + +# 3. Start with Docker +docker-compose up -d + +# 4. Watch logs to scan QR Code +docker-compose logs -f +``` + +**Scan the QR Code** that appears in the logs. + +### Useful Commands + +```bash +# View logs +docker-compose logs -f + +# Stop the bot +docker-compose down + +# Update +git pull +docker-compose up --build -d +``` + +--- + ## Linux ### 1. Clone the repository ```bash -git clone https://github.com/synt-xerror/manybot +git clone https://git.maneos.net/synt-xerror/manybot cd manybot ``` @@ -105,7 +151,7 @@ pkg update && pkg upgrade pkg install nodejs git # Clone and install -git clone https://github.com/synt-xerror/manybot +git clone https://git.maneos.net/synt-xerror/manybot cd manybot ```