From 4e6e1284f19701f46df4abec8d988d6682909474 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 2 Jul 2018 19:08:13 +0100 Subject: [PATCH] Add friendly names for passenger applications --- cookbooks/dev/recipes/default.rb | 2 +- cookbooks/dev/templates/default/apache.rails.erb | 1 + cookbooks/owl/templates/default/apache.erb | 1 + cookbooks/taginfo/templates/default/apache.erb | 1 + cookbooks/web/templates/default/apache.backend.erb | 1 + cookbooks/web/templates/default/apache.frontend.erb | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index 46ba9bdd3..c93176e25 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -243,7 +243,7 @@ if node[:postgresql][:clusters][:"9.5/main"] apache_site site_name do template "apache.rails.erb" - variables :name => site_name, :aliases => site_aliases, :secret_key_base => secret_key_base + variables :application_name => name, :aliases => site_aliases, :secret_key_base => secret_key_base end else apache_site site_name do diff --git a/cookbooks/dev/templates/default/apache.rails.erb b/cookbooks/dev/templates/default/apache.rails.erb index 983d1daf7..c8f5f779d 100644 --- a/cookbooks/dev/templates/default/apache.rails.erb +++ b/cookbooks/dev/templates/default/apache.rails.erb @@ -17,6 +17,7 @@ DocumentRoot /srv/<%= @name %>/public RailsEnv production + PassengerAppGroupName <%= @application_name %> SetEnv SECRET_KEY_BASE <%= @secret_key_base %> diff --git a/cookbooks/owl/templates/default/apache.erb b/cookbooks/owl/templates/default/apache.erb index 94dbc3ef1..d5af8e1d5 100644 --- a/cookbooks/owl/templates/default/apache.erb +++ b/cookbooks/owl/templates/default/apache.erb @@ -10,6 +10,7 @@ DocumentRoot /srv/<%= @name %>/openstreetmap-watch-list/rails/public RailsEnv production + PassengerAppGroupName owl SetOutputFilter DEFLATE diff --git a/cookbooks/taginfo/templates/default/apache.erb b/cookbooks/taginfo/templates/default/apache.erb index 82fef8b37..4965a9bc1 100644 --- a/cookbooks/taginfo/templates/default/apache.erb +++ b/cookbooks/taginfo/templates/default/apache.erb @@ -15,6 +15,7 @@ RackEnv production PassengerMinInstances 10 PassengerPreStart http://<%= @name %>/ + PassengerAppGroupName taginfo CacheEnable disk /api CacheEnable disk /embed diff --git a/cookbooks/web/templates/default/apache.backend.erb b/cookbooks/web/templates/default/apache.backend.erb index c024090b2..089ca1c30 100644 --- a/cookbooks/web/templates/default/apache.backend.erb +++ b/cookbooks/web/templates/default/apache.backend.erb @@ -40,6 +40,7 @@ PassengerMinInstances 3 PassengerMaxRequests 500 PassengerPreStart https://www.openstreetmap.org/ + PassengerAppGroupName rails SetEnv SECRET_KEY_BASE <%= @secret_key_base %> # diff --git a/cookbooks/web/templates/default/apache.frontend.erb b/cookbooks/web/templates/default/apache.frontend.erb index 402d4209d..d2e850fff 100644 --- a/cookbooks/web/templates/default/apache.frontend.erb +++ b/cookbooks/web/templates/default/apache.frontend.erb @@ -153,6 +153,7 @@ PassengerMaxRequests 5000 PassengerMaxRequestQueueSize 250 PassengerPreStart https://www.openstreetmap.org/ + PassengerAppGroupName rails SetEnv SECRET_KEY_BASE <%= @secret_key_base %> Alias /favicon.ico <%= node[:web][:base_directory] %>/rails/app/assets/favicons/favicon.ico Alias /openlayers <%= node[:web][:base_directory] %>/rails/vendor/assets/openlayers -- 2.39.5