Como instalar o Chatwoot com Docker Compose

Como instalar o Chatwoot com Docker Compose


Este tutorial mostra como subir o Chatwoot usando contêineres Docker de forma simples e organizada, ideal para iniciantes, para isso iremos usar o Painel ICP da Integrator Host.

Neste tutorial, você verá:

✔️ Criar o docker compose
✔️ Acessa uma página de exemplo (https://example.com).


📌 Simplifique seu processo de deploy com o nosso painel ICP!

📌 Passo 1: Criar o seu docker-compose.yml

version: '3.8'

services:
  db:
    image: pgvector/pgvector:pg17
    restart: always
    environment:
      POSTGRES_DB: chatwoot_production
      POSTGRES_USER: chatwoot
      POSTGRES_PASSWORD: FBbrNt56ay5amn6545nzmt
    volumes:
      - db_data:/var/lib/postgresql/data

  redis:
    image: redis:6-alpine
    restart: always
    volumes:
      - redis_data:/data

  chatwoot:
    image: chatwoot/chatwoot:latest
    depends_on:
      - db
      - redis
    restart: always
    env_file:
      - .env
    command: >
      sh -lc "
      bundle exec rails db:prepare &&
      bundle exec rails server -b 0.0.0.0
      "
    environment:
      RAILS_ENV: production
      DATABASE_URL: postgres://chatwoot:FBbrNt56ay5amn6545nzmt@db:5432/chatwoot_production
      REDIS_URL: redis://redis:6379/0
      SECRET_KEY_BASE: ${SECRET_KEY_BASE}
      RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
    ports:
      - "3000:3000"
    volumes:
      - uploads:/app/public/uploads

  worker:
    image: chatwoot/chatwoot:latest
    command: bundle exec sidekiq
    depends_on:
      - db
      - redis
    restart: always
    env_file:
      - .env
    environment:
      RAILS_ENV: production
      DATABASE_URL: postgres://chatwoot:FBbrNt56ay5amn6545nzmt@db:5432/chatwoot_production
      REDIS_URL: redis://redis:6379/0
      SECRET_KEY_BASE: ${SECRET_KEY_BASE}
      RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}

volumes:
  db_data:
  redis_data:
  uploads:

📌 Passo 2: Criar o seu .env

# Ambiente
RAILS_ENV=production

# Rails
SECRET_KEY_BASE=2f8a9d3c4e7f6b1a5c2d9e8f3b4a1c0d6e7f5a4b3c2d1e0f9a8b7c6d5e4f3a2
RAILS_MASTER_KEY=3f1b2c4d5e6a7b8c9d0e1f2a3b4c5d6e

# URLs
FRONTEND_URL=https://chat.panel-icp.integrator.host
FORCE_SSL=true
DEFAULT_LOCALE=pt_BR

# Banco (opcional, mas recomendado)
POSTGRES_HOST=db
POSTGRES_PORT=5432
POSTGRES_DATABASE=chatwoot_production
POSTGRES_USERNAME=chatwoot
POSTGRES_PASSWORD=FBbrNt56ay5amn6545nzmt
DATABASE_URL=postgres://chatwoot:FBbrNt56ay5amn6545nzmt@db:5432/chatwoot_production

# Redis
REDIS_URL=redis://redis:6379/0

# SMTP
SMTP_ADDRESS=smtp.panel-icp.integrator.host
SMTP_PORT=587
SMTP_USER=usuario@panel-icp.integrator.host
SMTP_PASSWORD=OutraS3nh4!
SMTP_DOMAIN=panel-icp.integrator.host
SMTP_AUTHENTICATION=login
SMTP_ENABLE_STARTTLS_AUTO=true

MAILER_SENDER_EMAIL=Chatwoot <usuario@panel-icp.integrator.host>
SMTP_FROM_EMAIL=usuario@panel-icp.integrator.host

# Pusher (se não usar, deixa vazio)
PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_CLUSTER=

📌 Passo 3: Subir o seu docker-compose.yml usando o Painel ICP

Veja mais detalhes em nosso vídeo do Youtube.

https://youtu.be/Aq3TGhZUPMI