Fix redis urls

This commit is contained in:
Eugene Burmakin 2025-06-09 14:10:49 +02:00
parent 1ed01a0c0b
commit 3d26a49627
8 changed files with 13 additions and 13 deletions

View file

@ -20,7 +20,7 @@ services:
tty: true
environment:
RAILS_ENV: development
REDIS_URL: redis://dawarich_redis:6379/0
REDIS_URL: redis://dawarich_redis:6379
DATABASE_HOST: dawarich_db
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: password

View file

@ -3,4 +3,4 @@ DATABASE_USERNAME=postgres
DATABASE_PASSWORD=password
DATABASE_NAME=dawarich_development
DATABASE_PORT=5432
REDIS_URL=redis://localhost:6379/1
REDIS_URL=redis://localhost:6379

View file

@ -3,4 +3,4 @@ DATABASE_USERNAME=postgres
DATABASE_PASSWORD=password
DATABASE_NAME=dawarich_test
DATABASE_PORT=5432
REDIS_URL=redis://localhost:6379/1
REDIS_URL=redis://localhost:6379

View file

@ -1,11 +1,11 @@
development:
adapter: redis
url: <%= ENV['REDIS_URL'] %>
url: <%= "#{ENV.fetch("REDIS_URL")}/2" %>
test:
adapter: test
production:
adapter: redis
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
url: <%= "#{ENV.fetch("REDIS_URL")}/2" %>
channel_prefix: dawarich_production

View file

@ -4,7 +4,7 @@ settings = {
debug_mode: true,
timeout: 5,
units: :km,
cache: Redis.new,
cache: Redis.new(url: ENV['REDIS_URL']),
always_raise: :all,
http_headers: {
'User-Agent' => "Dawarich #{APP_VERSION} (https://dawarich.app)"

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
Sidekiq.configure_server do |config|
config.redis = { url: ENV['REDIS_URL'] }
config.redis = { url: "#{ENV['REDIS_URL']}/1" }
config.logger = Sidekiq::Logger.new($stdout)
if ENV['PROMETHEUS_EXPORTER_ENABLED'].to_s == 'true'

View file

@ -56,7 +56,7 @@ services:
restart: on-failure
environment:
RAILS_ENV: production
REDIS_URL: redis://dawarich_redis:6379/0
REDIS_URL: redis://dawarich_redis:6379
DATABASE_HOST: dawarich_db
DATABASE_PORT: 5432
DATABASE_USERNAME: postgres
@ -111,7 +111,7 @@ services:
restart: on-failure
environment:
RAILS_ENV: production
REDIS_URL: redis://dawarich_redis:6379/0
REDIS_URL: redis://dawarich_redis:6379
DATABASE_HOST: dawarich_db
DATABASE_PORT: 5432
DATABASE_USERNAME: postgres
@ -132,7 +132,7 @@ services:
max-size: "100m"
max-file: "5"
healthcheck:
test: [ "CMD-SHELL", "bundle exec sidekiqmon processes | grep $${HOSTNAME}" ]
test: [ "CMD-SHELL", "pgrep -f sidekiq" ]
interval: 10s
retries: 30
start_period: 30s

View file

@ -59,7 +59,7 @@ services:
restart: on-failure
environment:
RAILS_ENV: development
REDIS_URL: redis://dawarich_redis:6379/0
REDIS_URL: redis://dawarich_redis:6379
DATABASE_HOST: dawarich_db
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: password
@ -112,7 +112,7 @@ services:
restart: on-failure
environment:
RAILS_ENV: development
REDIS_URL: redis://dawarich_redis:6379/0
REDIS_URL: redis://dawarich_redis:6379
DATABASE_HOST: dawarich_db
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: password
@ -131,7 +131,7 @@ services:
max-size: "100m"
max-file: "5"
healthcheck:
test: [ "CMD-SHELL", "bundle exec sidekiqmon processes | grep $${HOSTNAME}" ]
test: [ "CMD-SHELL", "pgrep -f sidekiq" ]
interval: 10s
retries: 30
start_period: 30s