From 9944a9b1a55fd75b9b874170dc76050f0c3db33c Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Mon, 7 Sep 2026 17:43:42 +0300 Subject: [PATCH] adjust bind address --- config/dotenv.rb | 2 +- lib/puma/plugin/redis_server.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/dotenv.rb b/config/dotenv.rb index cb0f8e7c..0a6aedf0 100644 --- a/config/dotenv.rb +++ b/config/dotenv.rb @@ -105,6 +105,6 @@ if ENV['REDIS_URL'].to_s.empty? redis_password = Digest::SHA1.hexdigest("redis#{ENV.fetch('SECRET_KEY_BASE', '')}") - ENV['REDIS_URL'] = "redis://default:#{redis_password}@0.0.0.0:6379/0" + ENV['REDIS_URL'] = "redis://default:#{redis_password}@127.0.0.1:16379/0" ENV['LOCAL_REDIS_URL'] = ENV.fetch('REDIS_URL', nil) end diff --git a/lib/puma/plugin/redis_server.rb b/lib/puma/plugin/redis_server.rb index cad448f9..e7bf7f28 100644 --- a/lib/puma/plugin/redis_server.rb +++ b/lib/puma/plugin/redis_server.rb @@ -54,6 +54,7 @@ Puma::Plugin.create do Dir.chdir(ENV.fetch('WORKDIR', nil)) unless ENV['WORKDIR'].to_s.empty? exec('redis-server', '--requirepass', Digest::SHA1.hexdigest("redis#{ENV.fetch('SECRET_KEY_BASE', '')}"), + '--bind', '127.0.0.1', '--port', '16379', '--loglevel', 'warning') end end