Pular para o conteúdo principal

Instalação Typebot

Instalar Typebot mesma VPS NEXTCHAT​

Tutorial com muitos detalhes então preste bastante atenção e veja o vídeo que me baseado pra fazer o mesmo, para ajudar entender melhor os passos. Lembrando no vídeo ele usa traefik e alteramos usar caddy para ser compatível mesma vps nextchat

Baseado tutorial alterado para usar com caddy: https://rwebtec.com.br/instalar-typebot-portainer-lucrar-vendendo-assinaturas/

CRIAR SUBDOMÍNIO E APONTAR PARA O IP DA SUA VPS​

Exemplo: chatbot.webconfiavel.com.br chatbotapi.webconfiavel.com.br minios3.webconfiavel.com.br s3.webconfiavel.com.br

CHECAR PROPAGAÇÃO DO DOMÍNIO​

https://dnschecker.org/

Acesso Portainer​

Acesse URL do Portainer: http://seuip:9000/

Caso seja primeira vez tem que gerar senha conforme instruções abaixo

Acesso Portainer gerar senha​

"Your Portainer instance timed out for security purposes. To re-enable your Portainer instance, you will need to restart Portainer."

Executar no terminal

docker container restart portainer

Depois acesse novamente url http://seuip:9000/

Continuando​

  • Vai "Home" - "Live Connect" - "Stacks" - "Add Stack"
  • Name - postgresql-typebot
  • Web editor - Coloque conteudo abaixo
version: "3.7"

services:
postgres:
container_name: postgresqltypebot
image: postgres:17.2
restart: always
environment:
- POSTGRES_PASSWORD=Admin33Admin77
networks:
- typebot_rede
#ports:
# - 5432:5432
volumes:
- postgres_typebot:/var/lib/postgresql/data
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == manager
resources:
limits:
cpus: "0.5"
memory: 1024M

volumes:
postgres_typebot:
external: false
name: postgres_typebot

networks:
typebot_rede:
external: false
name: typebot_rede
  • Clique em Deploy the stack - Aguarde demora um pouco
  • Vai "Home" - "Live Connect" - "Stacks" - "Add Stack"
  • Name - minio-typebot
  • Web editor - Coloque conteudo abaixo
version: "3.7"

services:
minio:
container_name: miniotypebot
image: minio/minio
restart: always
command: server /data --console-address ":9001"
networks:
- typebot_rede
ports:
- 32771:9000
- 32772:9001
volumes:
- minio_data:/data
environment:
- MINIO_ROOT_USER=rodnei
- MINIO_ROOT_PASSWORD=Admin33Admin77
- MINIO_BROWSER_REDIRECT_URL=https://minios3.webconfiavel.com.br
- MINIO_SERVER_URL=https://s3.webconfiavel.com.br
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == manager
volumes:
minio_data:
external: false
name: minio_data

networks:
typebot_rede:
external: false
name: typebot_rede

. Editar arquivo caddy

sudo nano /etc/caddy/Caddyfile

. Acrecentar a dados do minio

minios3.webconfiavel.com.br {
reverse_proxy 127.0.0.1:32772
request_body {
max_size 200MB
}
}

s3.webconfiavel {
reverse_proxy 127.0.0.1:32771
request_body {
max_size 200MB
}
}

. Reiniciar o caddy

sudo systemctl restart caddy

. Agora acesse url minio "minios3.webconfiavel.com.br" - MINIO_ROOT_USER=rodnei - MINIO_ROOT_PASSWORD=Admin33Admin77

  • Dentro do minio siga instruções abaixo
  • Buckets -
  • Bucket Name - typebot
  • Create Bucket
  • Clica bucket criado typebot alterar "Access Policy" Public
  • Access Keys - Create Access Key
  • Copia o Access Key - Secret Key
  • Agora vamos voltar Portainer - "Stacks" - "Add Stack" - typebot_viewer
  • Web editor - Coloque conteudo abaixo - alterar com dados email etc para funcionar - no campos S3 vai colocar dados que você gerou acima
version: "3.7"

services:
typebot_viewer:
container_name: typebotviewer
image: baptistearno/typebot-viewer:latest
restart: always
networks:
- typebot_rede
ports:
- 8081:3000
environment:
- DATABASE_URL=postgresql://postgres:Admin33Admin77@postgres:5432/postgres
- ENCRYPTION_SECRET=7Rl2NKGhkMUHRV0dtRg8hD2YNopCrAeH
- DEFAULT_WORKSPACE_PLAN=UNLIMITED
- NEXTAUTH_URL=https://chatbot.webconfiavel.com.br
- NEXT_PUBLIC_VIEWER_URL=https://chatbotapi.webconfiavel.com.br
- NEXTAUTH_URL_INTERNAL=http://localhost:3000
- DISABLE_SIGNUP=true
- ADMIN_EMAIL=[email protected]
- NEXT_PUBLIC_SMTP_FROM='RWeb Tec' <[email protected]>
- SMTP_AUTH_DISABLED=false
- SMTP_USERNAME=[email protected]
- SMTP_PASSWORD=pfuvqidfkyhtaxtx
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=465
- SMTP_SECURE=false
# Configurações do Typebot e Google Cloud
#- GOOGLE_CLIENT_ID=
#- GOOGLE_CLIENT_SECRET=
# Configurações do Typebot e Minio
- S3_ACCESS_KEY=0euO7HOE7NTM6PmS6loK
- S3_SECRET_KEY=kGED9FHLuBFYLzFGwRkHy1SLAh7oSuKcfXzCfeyt
- S3_BUCKET=typebot
- S3_ENDPOINT=s3.webconfiavel.com.br
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == manager
resources:
limits:
cpus: "1"
memory: 1024M

networks:
typebot_rede:
external: false
name: typebot_rede
  • Agora vamos voltar Portainer - "Stacks" - "Add Stack" - typebot_builder
  • Web editor - Coloque conteúdo abaixo - alterar com dados email, semelhante o que você fez antes etc para funcionar - no campos S3 vai colocar dados que você gerou acima
version: "3.7"

services:
typebot_builder:
container_name: typebotbuilder
image: baptistearno/typebot-builder:latest
restart: always
networks:
- typebot_rede
ports:
- 8082:3000
environment:
- DATABASE_URL=postgresql://postgres:Admin33Admin77@postgres:5432/postgres
- ENCRYPTION_SECRET=7Rl2NKGhkMUHRV0dtRg8hD2YNopCrAeH
- DEFAULT_WORKSPACE_PLAN=UNLIMITED
- NEXTAUTH_URL=https://chatbot.webconfiavel.com.br
- NEXT_PUBLIC_VIEWER_URL=https://chatbotapi.webconfiavel.com.br
- NEXTAUTH_URL_INTERNAL=http://localhost:3000
- DISABLE_SIGNUP=true
- ADMIN_EMAIL=[email protected]
- NEXT_PUBLIC_SMTP_FROM='RWeb Tec' <[email protected]>
- SMTP_AUTH_DISABLED=false
- SMTP_USERNAME=[email protected]
- SMTP_PASSWORD=pfuvqidfkyhtaxtx
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=465
- SMTP_SECURE=false
# Configurações do Typebot e Google Cloud
#- GOOGLE_CLIENT_ID=
#- GOOGLE_CLIENT_SECRET=
# Configurações do Typebot e Minio
- S3_ACCESS_KEY=0euO7HOE7NTM6PmS6loK
- S3_SECRET_KEY=kGED9FHLuBFYLzFGwRkHy1SLAh7oSuKcfXzCfeyt
- S3_BUCKET=typebot
- S3_ENDPOINT=s3.webconfiavel.com.br
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- node.role == manager
resources:
limits:
cpus: "1"
memory: 1024M
networks:
typebot_rede:
external: false
name: typebot_rede
sudo nano /etc/caddy/Caddyfile

. Acrescentar a dados do typebot

chatbotapi.webconfiavel.com.br {
reverse_proxy 127.0.0.1:8081
request_body {
max_size 200MB
}
}

chatbot.webconfiavel.com.br {
reverse_proxy 127.0.0.1:8082
request_body {
max_size 200MB
}
}

. Reiniciar o caddy

sudo systemctl restart caddy

Adicionar minio na rede principal

docker network connect bridge miniotypebot

Adicionar typebot Builder

docker network connect bridge typebotbuilder

Adicionar Typebot Viewer

docker network connect bridge typebotviewer