gearheads
/
mastodon
Archived
2
0
Fork 0

Fix redis configuration not being changed by mastodon:setup (#18383)

Fixes #18342
gh/stable
Claire 2022-05-09 23:19:11 +02:00 committed by GitHub
parent 2b8dc58b7f
commit f714e24ff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,14 @@ namespace :mastodon do
prompt = TTY::Prompt.new prompt = TTY::Prompt.new
env = {} env = {}
# When the application code gets loaded, it runs `lib/mastodon/redis_configuration.rb`.
# This happens before application environment configuration and sets REDIS_URL etc.
# These variables are then used even when REDIS_HOST etc. are changed, so clear them
# out so they don't interfer with our new configuration.
ENV.delete('REDIS_URL')
ENV.delete('CACHE_REDIS_URL')
ENV.delete('SIDEKIQ_REDIS_URL')
begin begin
prompt.say('Your instance is identified by its domain name. Changing it afterward will break things.') prompt.say('Your instance is identified by its domain name. Changing it afterward will break things.')
env['LOCAL_DOMAIN'] = prompt.ask('Domain name:') do |q| env['LOCAL_DOMAIN'] = prompt.ask('Domain name:') do |q|