chore(newwhats): add newwhats.clube67.com domain mapping to Traefik, Nginx and webhook listener

This commit is contained in:
VPS 4 Builder
2026-05-18 03:48:01 +02:00
parent 37ef142673
commit 687e71be9b
3 changed files with 30 additions and 10 deletions
+28 -8
View File
@@ -6,8 +6,8 @@ services:
- "./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro" - "./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
# Roteador de Produção (clube67.com) # Roteador de Produção (clube67.com e newwhats.clube67.com)
- "traefik.http.routers.clube67-prod.rule=Host(`clube67.com`) || Host(`www.clube67.com`)" - "traefik.http.routers.clube67-prod.rule=Host(`clube67.com`) || Host(`www.clube67.com`) || Host(`newwhats.clube67.com`)"
- "traefik.http.routers.clube67-prod.entrypoints=websecure" - "traefik.http.routers.clube67-prod.entrypoints=websecure"
- "traefik.http.routers.clube67-prod.tls.certresolver=le" - "traefik.http.routers.clube67-prod.tls.certresolver=le"
- "traefik.http.services.clube67-prod.loadbalancer.server.port=80" - "traefik.http.services.clube67-prod.loadbalancer.server.port=80"
@@ -20,10 +20,11 @@ services:
- newwhats-frontend - newwhats-frontend
newwhats-backend: newwhats-backend:
build: image: node:20
context: "./newwhats.local/backend" container_name: newwhats-backend-prod
dockerfile: Dockerfile
restart: always restart: always
# rootless docker: container UID 0 já é mapeado para o usuário deploy do host
working_dir: /app
env_file: env_file:
- "./newwhats.local/backend/.env" - "./newwhats.local/backend/.env"
environment: environment:
@@ -39,21 +40,40 @@ services:
- "/home/deploy/newwhats-sessions:/app/sessions" - "/home/deploy/newwhats-sessions:/app/sessions"
- "/home/deploy/newwhats-media:/app/media" - "/home/deploy/newwhats-media:/app/media"
- "./newwhats.local/plugins:/app/plugins" - "./newwhats.local/plugins:/app/plugins"
# Montar diretórios e arquivos pré-compilados pelo builder (VPS 4)
- "./newwhats.local/backend/dist:/app/dist"
- "./newwhats.local/backend/package.json:/app/package.json"
- "./newwhats.local/backend/node_modules:/app/node_modules"
- "./newwhats.local/backend/prisma:/app/prisma"
command: node dist/server.js
security_opt:
- no-new-privileges:true
networks: networks:
- soc - soc
- web - web
newwhats-frontend: newwhats-frontend:
build: image: node:20-alpine
context: "./newwhats.local/frontend" container_name: newwhats-frontend-prod
dockerfile: Dockerfile
restart: always restart: always
# rootless docker: container UID 0 já é mapeado para o usuário deploy do host
working_dir: /app
env_file: env_file:
- "./newwhats.local/frontend/.env.production.local" - "./newwhats.local/frontend/.env.production.local"
environment: environment:
- PORT=3003 - PORT=3003
- NODE_ENV=production - NODE_ENV=production
- NEXT_PUBLIC_API_URL=https://clube67.com/api - NEXT_PUBLIC_API_URL=https://clube67.com/api
volumes:
# Montar diretórios e arquivos pré-compilados pelo builder (VPS 4)
- "./newwhats.local/frontend/.next:/app/.next"
- "./newwhats.local/frontend/public:/app/public"
- "./newwhats.local/frontend/next.config.mjs:/app/next.config.mjs"
- "./newwhats.local/frontend/package.json:/app/package.json"
- "./newwhats.local/frontend/node_modules:/app/node_modules"
command: npx next start -p 3003
security_opt:
- no-new-privileges:true
networks: networks:
- soc - soc
- web - web
+1 -1
View File
@@ -1,6 +1,6 @@
server { server {
listen 80; listen 80;
server_name clube67.com www.clube67.com; server_name clube67.com www.clube67.com newwhats.clube67.com;
# Limite de upload para mídias do WhatsApp # Limite de upload para mídias do WhatsApp
client_max_body_size 100M; client_max_body_size 100M;
+1 -1
View File
@@ -6,7 +6,7 @@ const fs = require('fs');
const PORT = 9000; const PORT = 9000;
const HOST = '10.99.0.4'; const HOST = '10.99.0.4';
const SECRET_TOKEN = 'gitea_webhook_secret_clube67_58e4a92c3d18'; const SECRET_TOKEN = 'gitea_webhook_secret_clube67_58e4a92c3d18';
const SCRIPT_PATH = '/home/deploy/stack/clube67/deploy-prod-builder.sh'; const SCRIPT_PATH = '/home/deploy/stack/newwhats.clube67.com/deploy-prod-builder.sh';
const LOG_FILE = '/home/deploy/stack/webhook-listener/deploy.log'; const LOG_FILE = '/home/deploy/stack/webhook-listener/deploy.log';
const GITEA_API_URL = 'http://10.99.0.3:3000/api/v1'; const GITEA_API_URL = 'http://10.99.0.3:3000/api/v1';
const GITEA_TOKEN = process.env.GITEA_TOKEN || 'ada47ca2fb196319dd10245cc216a327dac857ec'; const GITEA_TOKEN = process.env.GITEA_TOKEN || 'ada47ca2fb196319dd10245cc216a327dac857ec';