sendingtk / chatwoot

Other
100 stars 83 forks source link

Ruby Version Mismatch When Running Sidekiq on Chatwoot with Docker #129

Closed itallogravina closed 1 week ago

itallogravina commented 1 week ago

Describe the bug

I am trying to run Chatwoot with Docker Swarm using the sendingtk/chatwoot:v3.10.3 image. However, when starting the Sidekiq service, I encounter the following Ruby version mismatch error: bundler: failed to load command: sidekiq (/gems/ruby/3.3.0/bin/sidekiq) /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/definition.rb:447:in validate_ruby!': Your Ruby version is 3.3.3, but your Gemfile specified 3.2.2 (Bundler::RubyVersionMismatch) from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/definition.rb:422:invalidate_runtime!' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler.rb:158:in setup' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/setup.rb:32:inblock in <top (required)>' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/ui/shell.rb:159:in with_level' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/ui/shell.rb:111:insilence' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/setup.rb:32:in <top (required)>' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/cli/exec.rb:56:inrequire_relative' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/cli/exec.rb:56:in kernel_load' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/cli/exec.rb:23:inrun' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/cli.rb:455:in exec' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/vendor/thor/lib/thor/command.rb:28:inrun' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/vendor/thor/lib/thor.rb:527:indispatch' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/cli.rb:35:in dispatch' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/vendor/thor/lib/thor/base.rb:584:instart' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/cli.rb:29:in start' from /usr/local/bundle/gems/bundler-2.5.17/exe/bundle:28:inblock in <top (required)>' from /usr/local/bundle/gems/bundler-2.5.17/lib/bundler/friendly_errors.rb:117:in with_friendly_errors' from /usr/local/bundle/gems/bundler-2.5.17/exe/bundle:20:in<top (required)>' from /usr/local/bundle/bin/bundle:25:in load' from /usr/local/bundle/bin/bundle:25:in

'

To Reproduce

rum file docker compoe on docker swarn

Expected behavior

No response

Environment

Docker

Cloud Provider

AWS

Platform

Browser

Operating system

No response

Browser and version

No response

Docker (if applicable)

services: chatwoot: image: sendingtk/chatwoot:v3.10.3 command: bundle exec rails s -p 3000 -b 0.0.0.0 entrypoint: docker/entrypoints/rails.sh volumes:

  • chatwoot_data:/app/storage
  • chatwoot_public:/app networks:
  • minha_rede environment:
  • INSTALLATION_NAME=chatwoot
  • NODE_ENV=production
  • RAILS_ENV=production
  • INSTALLATION_ENV=docker
  • SECRET_KEY_BASE=123458bb7ef6402f6a8bcf5d3be54321
  • FRONTEND_URL=https://chatwoot.example.com
  • DEFAULT_LOCALE=pt_BR
  • FORCE_SSL=true
  • ENABLE_ACCOUNT_SIGNUP=false
  • REDIS_URL=redis://redis:6379
  • POSTGRES_HOST=postgres
  • POSTGRES_USERNAME=postgres
  • POSTGRES_PASSWORD=AdminAdmin
  • POSTGRES_DATABASE=chatwoot
  • ACTIVE_STORAGE_SERVICE=local
  • RAILS_LOG_TO_STDOUT=true
  • USE_INBOX_AVATAR_FOR_BOT=true

    Servidor de Email Gmail

  • MAILER_SENDER_EMAIL=Chatwoot itallo@example.com
  • SMTP_DOMAIN=zoho.com
  • SMTP_ADDRESS=smtp.zoho.com
  • SMTP_PORT=587
  • SMTP_USERNAME=itallo@example.com
  • exampleSMTP_PASSWORD=Mfcd
  • SMTP_AUTHENTICATION=login
  • SMTP_ENABLE_STARTTLS_AUTO=true
  • SMTP_OPENSSL_VERIFY_MODE=peer
  • MAILER_INBOUND_EMAIL_DOMAIN=itallo@example.com
  • LOG_LEVEL=debug
  • LOG_SIZE=1024 deploy: mode: replicated replicas: 1 placement: constraints:

    • node.role == manager resources: limits: cpus: "1" memory: 2048M labels:
      • traefik.enable=true
      • traefik.http.routers.chatwoot_app.rule=Host(chatwoot..com)
      • traefik.http.routers.chatwoot_app.entrypoints=websecure
      • traefik.http.routers.chatwoot_app.tls.certresolver=letsencryptresolver
      • traefik.http.routers.chatwoot_app.priority=1
      • traefik.http.routers.chatwoot_app.service=chatwoot_app
      • traefik.http.services.chatwoot_app.loadbalancer.server.port=3000
      • traefik.http.services.chatwoot_app.loadbalancer.passhostheader=true
      • traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https
      • traefik.http.routers.chatwoot_app.middlewares=sslheader@docker

    chatwoot_sidekiq: image: sendingtk/chatwoot command: bundle exec sidekiq -C config/sidekiq.yml volumes:

  • chatwoot_data:/app/storage
  • chatwoot_public:/app networks:
  • minha_rede environment:
  • INSTALLATION_NAME=chatwoot
  • NODE_ENV=production
  • RAILS_ENV=production
  • INSTALLATION_ENV=docker
  • SECRET_KEY_BASE=123458bb7ef6402f6a8bcf5d3be54321
  • FRONTEND_URL=https://chatwoot.example.com
  • DEFAULT_LOCALE=pt_BR
  • FORCE_SSL=true
  • ENABLE_ACCOUNT_SIGNUP=false
  • REDIS_URL=redis://redis:6379
  • POSTGRES_HOST=postgres
  • POSTGRES_USERNAME=postgres
  • POSTGRES_PASSWORD=AdminAdmin
  • POSTGRES_DATABASE=chatwoot
  • ACTIVE_STORAGE_SERVICE=local
  • RAILS_LOG_TO_STDOUT=true
  • USE_INBOX_AVATAR_FOR_BOT=true

    Servidor de Email Gmail

  • MAILER_SENDER_EMAIL=Chatwoot itallo@example.com
  • SMTP_DOMAIN=zoho.com
  • SMTP_ADDRESS=smtp.zoho.com
  • SMTP_PORT=587
  • SMTP_USERNAME=itallo@example.com
  • exampleSMTP_PASSWORD=Mfcd
  • SMTP_AUTHENTICATION=login
  • SMTP_ENABLE_STARTTLS_AUTO=true
  • SMTP_OPENSSL_VERIFY_MODE=peer
  • MAILER_INBOUND_EMAIL_DOMAIN=itallo@example.com
  • LOG_LEVEL=debug
  • LOG_SIZE=1024 deploy: mode: replicated replicas: 1 placement: constraints:
    • node.role == manager resources: limits: cpus: "1" memory: 2048M

volumes: chatwoot_data: external: true name: chatwoot_data chatwoot_public: external: true name: chatwoot_public

networks: minha_rede: external: true name: minha_rede

Additional context

No response

nestordavalos commented 1 week ago

delete your volume :/app/public and remap it

itallogravina commented 1 week ago

I deleted the entire volume and amazingly it worked, I thought I was going to lose the data but it worked