Page MenuHomeGRNET

No OneTemporary

File Metadata

Created
Fri, Apr 4, 12:24 AM
diff --git a/config/deploy.rb b/config/deploy.rb
index 02701fb..9bfaf65 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -1,23 +1,23 @@
# config valid only for Capistrano 3.1
lock '3.2.1'
set :application, 'webdns'
set :repo_url, 'git@bitbucket.org:xlembouras/webns.git'
set :deploy_to, '/srv/webdns'
-set :linked_files, %w(config/database.yml config/secrets.yml)
+set :linked_files, %w(config/database.yml config/secrets.yml config/local_settings.rb)
set :linked_dirs, %w(log tmp/pids tmp/cache tmp/sockets)
set :keep_releases, 5
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
execute 'sudo unicornctl respawn'
end
end
after :publishing, :restart
end
diff --git a/config/initializers/00_settings.rb b/config/initializers/00_settings.rb
index f308d90..692cada 100644
--- a/config/initializers/00_settings.rb
+++ b/config/initializers/00_settings.rb
@@ -1,23 +1,27 @@
WebDNS = Base
WebDNS.settings[:soa_defaults] = {
primary_ns: 'ns1.example.com',
contact: 'domainmaster@example.com',
serial: 1,
refresh: 10_800,
retry: 3600,
expire: 604_800,
nx: 3600
}
WebDNS.settings[:default_ns] = [
'ns1.example.com',
'ns2.example.com'
]
WebDNS.settings[:serial_strategy] = Strategies::Date
WebDNS.settings[:prohibit_records_types] = []
WebDNS.settings[:contact_mail] = 'webdns@example.com'
WebDNS.settings[:mail_from] = 'webdns@example.com'
WebDNS.settings[:admin_group] = 'admin'
+
+# Allow local overrides
+local_settings = File.expand_path('../../local_settings.rb', __FILE__)
+require_relative local_settings if File.exist?(local_settings)

Event Timeline