Commit 4fff03330994848130300901cb3bbd272216881a

Authored by Antonio Terceiro
1 parent 96839740

colab: split database configuration into its own file

like the RPM package does
cookbooks/colab/recipes/default.rb
... ... @@ -27,6 +27,13 @@ template '/etc/colab/settings.yaml' do
27 27 notifies :restart, 'service[colab]'
28 28 end
29 29  
  30 +template '/etc/colab/settings.d/00-database.yaml' do
  31 + owner 'root'
  32 + group 'colab'
  33 + mode 0640
  34 + notifies :restart, 'service[colab]'
  35 +end
  36 +
30 37 cookbook_file '/usr/lib/colab/lib/python2.7/site-packages/colab/static/img/logo.svg' do
31 38 owner 'root'
32 39 group 'root'
... ...
cookbooks/colab/templates/00-database.yaml.erb 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +DATABASES:
  2 + default:
  3 + ENGINE: django.db.backends.postgresql_psycopg2
  4 + NAME: colab
  5 + USER: colab
  6 + HOST: <%= node['peers']['database'] %>
... ...
cookbooks/colab/templates/settings.yaml.erb
1   -DATABASES:
2   - default:
3   - ENGINE: django.db.backends.postgresql_psycopg2
4   - NAME: colab
5   - USER: colab
6   - HOST: <%= node['peers']['database'] %>
7 1  
8 2 ## Set to false in production
9 3 DEBUG: false
... ...