diff --git a/site-cookbooks/kosmos-mastodon/attributes/default.rb b/site-cookbooks/kosmos-mastodon/attributes/default.rb index 801cd7e..88e323e 100644 --- a/site-cookbooks/kosmos-mastodon/attributes/default.rb +++ b/site-cookbooks/kosmos-mastodon/attributes/default.rb @@ -2,3 +2,4 @@ node.default["kosmos-mastodon"]["directory"] = "/opt/mastodon" node.default["kosmos-mastodon"]["puma_port"] = 3000 node.default["kosmos-mastodon"]["streaming_port"] = 4000 node.default["kosmos-mastodon"]["server_name"] = "kosmos.social" +node.default["kosmos-mastodon"]["redis_url"] = "redis://localhost:6379/1" diff --git a/site-cookbooks/kosmos-mastodon/recipes/default.rb b/site-cookbooks/kosmos-mastodon/recipes/default.rb index 818fe31..dc8dbee 100644 --- a/site-cookbooks/kosmos-mastodon/recipes/default.rb +++ b/site-cookbooks/kosmos-mastodon/recipes/default.rb @@ -71,8 +71,7 @@ application mastodon_path do mode "0640" owner "mastodon" group "mastodon" - variables redis_db: 1, - redis_actioncable_db: 2, + variables redis_url: node["kosmos-mastodon"]["redis_url"], domain: node["kosmos-mastodon"]["server_name"], paperclip_secret: mastodon_credentials['paperclip_secret'], secret_key_base: mastodon_credentials['secret_key_base'], diff --git a/site-cookbooks/kosmos-mastodon/templates/default/env.production.erb b/site-cookbooks/kosmos-mastodon/templates/default/env.production.erb index 9aa0da0..a034ab8 100644 --- a/site-cookbooks/kosmos-mastodon/templates/default/env.production.erb +++ b/site-cookbooks/kosmos-mastodon/templates/default/env.production.erb @@ -1,8 +1,5 @@ # Service dependencies -REDIS_HOST=localhost -REDIS_PORT=6379 -REDIS_DB=<%= @redis_db %> -REDIS_ACTIONCABLE_DB=<%= @redis_actioncable_db %> +REDIS_URL=<%= @redis_url %> DB_HOST=localhost DB_USER=postgres DB_NAME=mastodon