services:
evolution2:
image: atendai/evolution-api:v2.1.0
networks:
- chatwoot
entrypoint: >
/bin/sh -c "docker-entrypoint.sh && ./Docker/scripts/deploy_database.sh && apk add git && rm -rfv ./evolution-scripts && git clone https://github.com/wavoip/evolution-scripts.git && chmod 777 -R ./evolution-scripts && ./evolution-scripts/sync_wavoip_docker.sh && npm run start:prod"
environment:
- REDIS_PASSWORD=
- SERVER_URL=https://wavoipevolutionyt.comunidadezdg.com.br
- AUTHENTICATION_API_KEY=teste
- AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=true
- LANGUAGE=en
- DEL_INSTANCE=false
- DATABASE_PROVIDER=postgresql
- DATABASE_CONNECTION_URI=postgresql://evolution2:evolution2@postgres:5432/evolution2?schema=public
- DATABASE_SAVE_DATA_INSTANCE=true
- DATABASE_SAVE_DATA_NEW_MESSAGE=true
- DATABASE_SAVE_MESSAGE_UPDATE=true
- DATABASE_SAVE_DATA_CONTACTS=true
- DATABASE_SAVE_DATA_CHATS=true
- DATABASE_SAVE_DATA_LABELS=true
- DATABASE_SAVE_DATA_HISTORIC=true
- DATABASE_CONNECTION_CLIENT_NAME=evolution2
#Rabbitmq
- RABBITMQ_ENABLED=false
- RABBITMQ_URI=amqp://admin:admin@rabbitmq:5672/default
- RABBITMQ_EXCHANGE_NAME=evolution
- RABBITMQ_GLOBAL_ENABLED=false
- RABBITMQ_EVENTS_APPLICATION_STARTUP=false
- RABBITMQ_EVENTS_INSTANCE_CREATE=false
- RABBITMQ_EVENTS_INSTANCE_DELETE=false
- RABBITMQ_EVENTS_QRCODE_UPDATED=false
- RABBITMQ_EVENTS_MESSAGES_SET=false
- RABBITMQ_EVENTS_MESSAGES_UPSERT=true
- RABBITMQ_EVENTS_MESSAGES_EDITED=false
- RABBITMQ_EVENTS_MESSAGES_UPDATE=false
- RABBITMQ_EVENTS_MESSAGES_DELETE=false
- RABBITMQ_EVENTS_SEND_MESSAGE=false
- RABBITMQ_EVENTS_CONTACTS_SET=false
- RABBITMQ_EVENTS_CONTACTS_UPSERT=false
- RABBITMQ_EVENTS_CONTACTS_UPDATE=false
- RABBITMQ_EVENTS_PRESENCE_UPDATE=false
- RABBITMQ_EVENTS_CHATS_SET=false
- RABBITMQ_EVENTS_CHATS_UPSERT=false
- RABBITMQ_EVENTS_CHATS_UPDATE=false
- RABBITMQ_EVENTS_CHATS_DELETE=false
- RABBITMQ_EVENTS_GROUPS_UPSERT=false
- RABBITMQ_EVENTS_GROUP_UPDATE=false
- RABBITMQ_EVENTS_GROUP_PARTICIPANTS_UPDATE=false
- RABBITMQ_EVENTS_CONNECTION_UPDATE=true
- RABBITMQ_EVENTS_CALL=false
- RABBITMQ_EVENTS_TYPEBOT_START=false
- RABBITMQ_EVENTS_TYPEBOT_CHANGE_STATUS=false
#SqS
- SQS_ENABLED=false
- SQS_ACCESS_KEY_ID=
- SQS_SECRET_ACCESS_KEY=
- SQS_ACCOUNT_ID=
- SQS_REGION=
- WEBSOCKET_ENABLED=false
- WEBSOCKET_GLOBAL_EVENTS=false
- WA_BUSINESS_TOKEN_WEBHOOK=evolution
- WA_BUSINESS_URL=https://graph.facebook.com
- WA_BUSINESS_VERSION=v20.0
- WA_BUSINESS_LANGUAGE=pt_BR
#Webhook
- WEBHOOK_GLOBAL_URL=''
- WEBHOOK_GLOBAL_ENABLED=false
- WEBHOOK_GLOBAL_WEBHOOK_BY_EVENTS=false
- WEBHOOK_EVENTS_APPLICATION_STARTUP=false
- WEBHOOK_EVENTS_QRCODE_UPDATED=true
- WEBHOOK_EVENTS_MESSAGES_SET=true
- WEBHOOK_EVENTS_MESSAGES_UPSERT=true
- WEBHOOK_EVENTS_MESSAGES_EDITED=true
- WEBHOOK_EVENTS_MESSAGES_UPDATE=true
- WEBHOOK_EVENTS_MESSAGES_DELETE=true
- WEBHOOK_EVENTS_SEND_MESSAGE=true
- WEBHOOK_EVENTS_CONTACTS_SET=true
- WEBHOOK_EVENTS_CONTACTS_UPSERT=true
- WEBHOOK_EVENTS_CONTACTS_UPDATE=true
- WEBHOOK_EVENTS_PRESENCE_UPDATE=true
- WEBHOOK_EVENTS_CHATS_SET=true
- WEBHOOK_EVENTS_CHATS_UPSERT=true
- WEBHOOK_EVENTS_CHATS_UPDATE=true
- WEBHOOK_EVENTS_CHATS_DELETE=true
- WEBHOOK_EVENTS_GROUPS_UPSERT=true
- WEBHOOK_EVENTS_GROUPS_UPDATE=true
- WEBHOOK_EVENTS_GROUP_PARTICIPANTS_UPDATE=true
- WEBHOOK_EVENTS_CONNECTION_UPDATE=true
- WEBHOOK_EVENTS_LABELS_EDIT=true
- WEBHOOK_EVENTS_LABELS_ASSOCIATION=true
- WEBHOOK_EVENTS_CALL=true
- WEBHOOK_EVENTS_TYPEBOT_START=false
- WEBHOOK_EVENTS_TYPEBOT_CHANGE_STATUS=false
- WEBHOOK_EVENTS_ERRORS=false
- WEBHOOK_EVENTS_ERRORS_WEBHOOK=
- CONFIG_SESSION_PHONE_CLIENT=Evolution API V2
- CONFIG_SESSION_PHONE_NAME=Chrome
- CONFIG_SESSION_PHONE_VERSION=2.3000.1015901307 # https://web.whatsapp.com/check-update?version=0&platform=web
- QRCODE_LIMIT=30
#Openai
- OPENAI_ENABLED=true
#Dify
- DIFY_ENABLED=true
#Typebot
- TYPEBOT_ENABLED=true
- TYPEBOT_API_VERSION=latest
#Chatwoot
- CHATWOOT_ENABLED=true
- CHATWOOT_MESSAGE_READ=true
- CHATWOOT_MESSAGE_DELETE=true
- CHATWOOT_IMPORT_DATABASE_CONNECTION_URI=postgresql://evolution2:evolution2@postgres:5432/chatwoot?sslmode=disable
- CHATWOOT_IMPORT_PLACEHOLDER_MEDIA_MESSAGE=true
#redis
- CACHE_REDIS_ENABLED=true
- CACHE_REDIS_URI=redis://redis:6379
- CACHE_REDIS_PREFIX_KEY=evolution
- CACHE_REDIS_SAVE_INSTANCES=false
- CACHE_LOCAL_ENABLED=false
#Minio
- S3_ENABLED=false
- S3_ACCESS_KEY=suachave
- S3_SECRET_KEY=suachave
- S3_BUCKET=evolutionv3
- S3_PORT=443
- S3_ENDPOINT=minioserver.meubot.top
- S3_USE_SSL=true
labels:
- traefik.enable=true
- traefik.http.routers.evolution_v2.rule=Host(`wavoipevolutionyt.comunidadezdg.com.br`)
- traefik.http.routers.evolution_v2.entrypoints=websecure
- traefik.http.routers.evolution_v2.priority=1
- traefik.http.routers.evolution_v2.tls.certresolver=myresolver
- traefik.http.routers.evolution_v2.service=evolution_v2
- traefik.http.services.evolution_v2.loadbalancer.server.port=8080
- traefik.http.services.evolution_v2.loadbalancer.passHostHeader=true
volumes:
- evolution_code_data:/evolution
base: &base
image: sendingtk/chatwoot:v3.13.6
environment:
- SECRET_KEY_BASE=teste2
- FRONTEND_URL=https://wavoipchatwootyt.comunidadezdg.com.br
- ASSET_CDN_HOST=
- FORCE_SSL=false
- ENABLE_ACCOUNT_SIGNUP=false
# Redis config
- REDIS_URL=redis://redis:6379
- REDIS_PASSWORD=
- REDIS_SENTINELS=
- REDIS_SENTINEL_MASTER_NAME=
# Postgres Database config variables
- POSTGRES_HOST=postgres
- POSTGRES_USERNAME=evolution2
- POSTGRES_PASSWORD=evolution2
- RAILS_MAX_THREADS=5
# Email configuration
- MAILER_SENDER_EMAIL="Chatwoot "
- SMTP_DOMAIN=chatwoot.com
- SMTP_ADDRESS=
- SMTP_PORT=1025
- SMTP_USERNAME=
- SMTP_PASSWORD=
- SMTP_AUTHENTICATION=
- SMTP_ENABLE_STARTTLS_AUTO=true
- SMTP_OPENSSL_VERIFY_MODE=peer
# Mail Incoming
- MAILER_INBOUND_EMAIL_DOMAIN=
- RAILS_INBOUND_EMAIL_SERVICE=
- RAILS_INBOUND_EMAIL_PASSWORD=
- MAILGUN_INGRESS_SIGNING_KEY=
- MANDRILL_INGRESS_API_KEY=
# Storage
- ACTIVE_STORAGE_SERVICE=local
# Amazon S3
- S3_BUCKET_NAME=
- AWS_ACCESS_KEY_ID=
- AWS_SECRET_ACCESS_KEY=
- AWS_REGION=
# Log settings
- RAILS_LOG_TO_STDOUT=true
- LOG_LEVEL=info
- LOG_SIZE=500
# Social media channels
- FB_VERIFY_TOKEN=
- FB_APP_SECRET=
- FB_APP_ID=
- IG_VERIFY_TOKEN=
- TWITTER_APP_ID=
- TWITTER_CONSUMER_KEY=
- TWITTER_CONSUMER_SECRET=
- TWITTER_ENVIRONMENT=
# Slack integration
- SLACK_CLIENT_ID=
- SLACK_CLIENT_SECRET=
# Google OAuth
- GOOGLE_OAUTH_CLIENT_ID=
- GOOGLE_OAUTH_CLIENT_SECRET=
- GOOGLE_OAUTH_CALLBACK_URL=
# Mobile app env variables
- IOS_APP_ID=L7YLMN4634.com.chatwoot.app
- ANDROID_BUNDLE_ID=com.chatwoot.app
- ANDROID_SHA256_CERT_FINGERPRINT=AC:73:8E:DE:EB:56:EA:CC:10:87:02:A7:65:37:7B:38:D4:5D:D4:53:F8:3B:FB:D3:C6:28:64:1D:AA:08:1E:D8
# Push Notification
- ENABLE_PUSH_RELAY_SERVER=true
# Stripe API key
- STRIPE_SECRET_KEY=
- STRIPE_WEBHOOK_SECRET=
# Direct uploads
- DIRECT_UPLOADS_ENABLED=
# MS OAUTH creds
- AZURE_APP_ID=
- AZURE_APP_SECRET=
# AI powered features
# OPENAI_API_KEY=""
# Advanced configurations
# SIDEKIQ_CONCURRENCY=10
volumes:
- /data/storage:/app/storage
networks:
- chatwoot
db_prepare:
<<: *base
depends_on:
- postgres
- redis
extends:
service: base
command: /bin/sh -c "until nc -z postgres 5432; do sleep 1; done; bundle exec rails db:chatwoot_prepare"
environment:
- NODE_ENV=production
- RAILS_ENV=production
- INSTALLATION_ENV=docker
- REDIS_URL=redis://redis:6379
- REDIS_PASSWORD=
- REDIS_SENTINELS=
- REDIS_SENTINEL_MASTER_NAME=
networks:
- chatwoot
rails:
<<: *base
extends:
service: base
depends_on:
- postgres
- redis
- db_prepare
deploy:
mode: replicated
replicas: 1
placement:
max_replicas_per_node: 1
labels:
- "traefik.enable=true"
- "traefik.constraint-label=traefik-public"
- "traefik.http.services.chatwoot.loadbalancer.server.port=3000"
- "traefik.http.routers.chatwoot.rule=Host(`wavoipchatwootyt.comunidadezdg.com.br`)"
- "traefik.http.routers.chatwoot.tls=true"
- "traefik.http.middlewares.chatwoot.headers.SSLRedirect=true"
- "traefik.http.middlewares.chatwoot.headers.STSSeconds=315360000"
- "traefik.http.middlewares.chatwoot.headers.browserXSSFilter=true"
- "traefik.http.middlewares.chatwoot.headers.contentTypeNosniff=true"
- "traefik.http.middlewares.chatwoot.headers.forceSTSHeader=true"
- "traefik.http.middlewares.chatwoot.headers.SSLHost=example.io"
- "traefik.http.middlewares.chatwoot.headers.STSIncludeSubdomains=true"
- "traefik.http.middlewares.chatwoot.headers.STSPreload=true"
- "traefik.http.routers.chatwoot.middlewares=chatwoot@docker"
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- RAILS_ENV=production
- INSTALLATION_ENV=docker
- REDIS_URL=redis://redis:6379
- REDIS_PASSWORD=
- REDIS_SENTINELS=
- REDIS_SENTINEL_MASTER_NAME=
entrypoint: docker/entrypoints/rails.sh
command: ["bundle", "exec", "rails", "s", "-p", "3000", "-b", "0.0.0.0"]
restart: always
labels:
- traefik.enable=true
- traefik.http.routers.chatwoot.rule=Host(`wavoipchatwootyt.comunidadezdg.com.br`)
- traefik.http.routers.chatwoot.entrypoints=websecure
- traefik.http.routers.chatwoot.priority=1
- traefik.http.routers.chatwoot.tls.certresolver=myresolver
- traefik.http.routers.chatwoot.service=chatwoot
- traefik.http.services.chatwoot.loadbalancer.server.port=3000
- traefik.http.services.chatwoot.loadbalancer.passHostHeader=true
networks:
- chatwoot
postgres:
image: postgres:latest
environment:
POSTGRES_DB: evolution2
POSTGRES_USER: evolution2
POSTGRES_PASSWORD: evolution2
networks:
- chatwoot
volumes:
- evolution_postgres_data:/var/lib/postgresql/data
redis:
image: redis:latest
command:
- "redis-server"
- "--appendonly yes"
- "--port 6379"
volumes:
- evolution_redis_data:/data
networks:
- chatwoot
environment:
- REDIS_URL=redis://redis:6379
- REDIS_PASSWORD=
- REDIS_SENTINELS=
- REDIS_SENTINEL_MASTER_NAME=
sidekiq:
<<: *base
extends:
service: base
depends_on:
- postgres
- redis
- db_prepare
environment:
- NODE_ENV=production
- RAILS_ENV=production
- INSTALLATION_ENV=docker
- REDIS_PASSWORD=
command: ["bundle", "exec", "sidekiq", "-C", "config/sidekiq.yml"]
restart: always
networks:
- chatwoot
volumes:
evolution_code_data:
evolution_postgres_data:
evolution_redis_data:
networks:
chatwoot:
external: true