dragonflydb / dragonfly

A modern replacement for Redis and Memcached
https://www.dragonflydb.io/
Other
25.96k stars 954 forks source link

Deploying with Rails 8 with kamal 2 #4089

Closed sandip-mane closed 2 weeks ago

sandip-mane commented 2 weeks ago

Describe the bug I am unable to deploy it with Rails 8 using Kamal 2.

Here's the config I am using: ```yaml service: rails_8_with_dragonflydb image: xxx/rails_8_with_dragonflydb servers: web: - xxx.xx.xxx.xxx registry: username: xxxx password: - KAMAL_REGISTRY_PASSWORD env: secret: - RAILS_MASTER_KEY clear: REDIS_URL: "redis://rails_8_with_dragonflydb-dragonflydb:6379/0" aliases: console: app exec --interactive --reuse "bin/rails console" shell: app exec --interactive --reuse "bash" logs: app logs -f dbc: app exec --interactive --reuse "bin/rails dbconsole" volumes: - "rails_8_with_dragonflydb_storage:/rails/storage" asset_path: /rails/public/assets builder: arch: amd64 accessories: dragonflydb: image: docker.dragonflydb.io/dragonflydb/dragonfly cmd: "docker.dragonflydb.io/dragonflydb/dragonfly --network=host --ulimit memlock=-1" roles: - web directories: - dragonflydata:/data ```
Redis config that works fine: ```yaml service: rails_8_with_redis image: xxxx/rails_8_with_redis servers: web: - xxx.xx.xxx.xx registry: username: xxxx password: - KAMAL_REGISTRY_PASSWORD env: secret: - RAILS_MASTER_KEY clear: REDIS_URL: "redis://rails_8_with_redis-redis:6379/0" aliases: console: app exec --interactive --reuse "bin/rails console" shell: app exec --interactive --reuse "bash" logs: app logs -f dbc: app exec --interactive --reuse "bin/rails dbconsole" volumes: - "rails_8_with_redis_storage:/rails/storage" asset_path: /rails/public/assets builder: arch: amd64 accessories: redis: image: redis:7.2.3 roles: - web directories: - data:/data ```

To Reproduce After deploying,

  1. Run kamal console
  2. Run Redis.new.keys("*")

Screenshots CleanShot 2024-11-08 at 18 56 31

Environment (please complete the following information):

romange commented 2 weeks ago

you config is wrong. you use cmd: "docker.dragonflydb.io/dragonflydb/dragonfly --network=host --ulimit memlock=-1" which is for running a standalone docker. Not a bug in dragonfly. You are welcome to join discord or discourse forums and ask there