bot-mwsm 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -247,3 +247,28 @@ jobs:
247
247
  }
248
248
  echo "✅ Publicação via token concluída com sucesso!"
249
249
 
250
+ - name: 🐋 Build & Push Docker Image
251
+ if: steps.detect.outputs.DB_CHANGED == 'true'
252
+ env:
253
+ DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
254
+ DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
255
+ run: |
256
+ set -e
257
+ echo "🐋 Iniciando build e push da imagem Docker..."
258
+
259
+ VERSION="${{ steps.version.outputs.version }}"
260
+ IMAGE="${DOCKERHUB_USERNAME}/mwsm"
261
+
262
+ echo "🔐 Fazendo login no Docker Hub..."
263
+ echo "${DOCKERHUB_TOKEN}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin
264
+
265
+ echo "🏗️ Construindo imagem ${IMAGE}:${VERSION}..."
266
+ docker buildx create --use --name builder || true
267
+ docker buildx build --platform linux/amd64 \
268
+ -t "${IMAGE}:${VERSION}" \
269
+ -t "${IMAGE}:latest" \
270
+ --push .
271
+
272
+ echo "✅ Imagem publicada com sucesso:"
273
+ echo " 🔹 ${IMAGE}:${VERSION}"
274
+ echo " 🔹 ${IMAGE}:latest"
package/Dockerfile ADDED
@@ -0,0 +1,42 @@
1
+ # ========================================
2
+ # 🐋 Mwsm - Ambiente Completo
3
+ # ========================================
4
+ FROM node:20-bullseye
5
+
6
+ # Instalar pacotes do sistema e Python
7
+ RUN apt-get update && apt-get install -y \
8
+ python3 python3-pip python3-venv sqlite3 git curl wget jq build-essential \
9
+ libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev libasound2 \
10
+ ca-certificates fonts-liberation libappindicator3-1 \
11
+ libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
12
+ libexpat1 libfontconfig1 libgbm1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 \
13
+ libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
14
+ libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \
15
+ libxrender1 libxss1 libxtst6 lsb-release xdg-utils \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ # Instalar libs Python
19
+ RUN pip3 install --no-cache-dir \
20
+ flask==2.2.5 \
21
+ sentence-transformers==2.2.2 \
22
+ huggingface_hub==0.10.1 \
23
+ transformers==4.25.1 \
24
+ safetensors==0.3.1
25
+
26
+ # Instalar PM2 globalmente
27
+ RUN npm install -g pm2@latest
28
+
29
+ # Criar diretório do app
30
+ WORKDIR /var/api/Mwsm
31
+
32
+ # Copiar o projeto local
33
+ COPY . .
34
+
35
+ # Instalar dependências Node
36
+ RUN npm install --production
37
+
38
+ # Expor a porta padrão
39
+ EXPOSE 8000
40
+
41
+ # Iniciar via PM2 (como no Ubuntu real)
42
+ CMD ["pm2-runtime", "npm", "--", "run", "setup:mwsm"]
package/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  <p align="center">
4
4
  <a href="javascript:void(0)">
5
- <img src="https://img.shields.io/badge/Build-3.0.2-blue?style=for-the-badge" alt="Badge">
5
+ <img src="https://img.shields.io/badge/Build-3.0.4-blue?style=for-the-badge" alt="Badge">
6
6
  </a>
7
7
  <a href="javascript:void(0)">
8
- <img src="https://img.shields.io/badge/Update-16%2F10%2F2025%2017:35-green?style=for-the-badge" alt="Badge">
8
+ <img src="https://img.shields.io/badge/Update-17%2F10%2F2025%2015:00-green?style=for-the-badge" alt="Badge">
9
9
  </a>
10
10
  <a href="https://github.com/MKCodec/Mwsm">
11
11
  <img src="https://img.shields.io/github/stars/MKCodec/Mwsm?style=for-the-badge" alt="Badge">