Add Redis, Sidekiq to Docker Compose setup #110

Merged
raucao merged 5 commits from feature/docker-compose_sidekiq into master 2023-03-31 09:09:46 +00:00
3 changed files with 14 additions and 0 deletions
Showing only changes of commit 6b7a80e23a - Show all commits

View File

@@ -7,6 +7,8 @@ SMTP_DOMAIN=example.com
SMTP_AUTH_METHOD=plain
SMTP_ENABLE_STARTTLS=auto
REDIS_URL='redis://localhost:6379/1'
LDAP_HOST=localhost
LDAP_PORT=389
LDAP_ADMIN_PASSWORD=passthebutter

View File

@@ -2,6 +2,13 @@
class Setting < RailsSettings::Base
cache_prefix { "v1" }
#
# Internal services
#
field :redis_url, type: :string, readonly: true,
default: ENV["REDIS_URL"] || "redis://localhost:6379/0"
Review

Any particular reason why the DB part of the fallback URL is different from the one in the .env.example (0 vs 1)?

Any particular reason why the DB part of the fallback URL is different from the one in the `.env.example` (0 vs 1)?
Review

Yes: it's because you don't need the environment variable if you want to use the default URL.

Yes: it's because you don't need the environment variable if you want to use the default URL.
#
# Registrations
#

View File

@@ -0,0 +1,5 @@
require_relative "../../app/models/setting"
Sidekiq.configure_server do |config|
config.redis = { url: Setting.redis_url }
end