WIP: checkpoint
authorLorin Hochstein <lhochstein@netflix.com>
Fri, 20 Jan 2017 04:41:35 +0000 (20:41 -0800)
committerLorin Hochstein <lhochstein@netflix.com>
Fri, 20 Jan 2017 04:41:35 +0000 (20:41 -0800)
ch13/ansible/roles/mezzanine/templates/local_settings.py.filters.j2
ch13/ansible/roles/mezzanine/templates/local_settings.py.j2
ch13/ansible/roles/mezzanine/vars/main.yml

index 69a0697..619b9b8 100644 (file)
@@ -9,15 +9,15 @@ DATABASES = {
         # Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle".
         "ENGINE": "django.db.backends.postgresql_psycopg2",
         # DB name or path to database file if using sqlite3.
-        "NAME": "{{ proj_name }}",
+        "NAME": "{{ mezzanine_proj_name }}",
         # Not used with sqlite3.
-        "USER": "{{ proj_name }}",
+        "USER": "{{ database_user }}",
         # Not used with sqlite3.
         "PASSWORD": "{{ db_pass }}",
         # Set to empty string for localhost. Not used with sqlite3.
-        "HOST": "127.0.0.1",
+        "HOST": "{{ database_host | default("localhost") }}",
         # Set to empty string for default. Not used with sqlite3.
-        "PORT": "",
+        "PORT": "{{ database_port }}",
     }
 }
 
@@ -25,7 +25,7 @@ SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTOCOL", "https")
 
 CACHE_MIDDLEWARE_SECONDS = 60
 
-CACHE_MIDDLEWARE_KEY_PREFIX = "{{ proj_name }}"
+CACHE_MIDDLEWARE_KEY_PREFIX = "{{ mezzanine_proj_name }}"
 
 CACHES = {
     "default": {
index 47cb458..d893455 100644 (file)
@@ -11,7 +11,7 @@ DATABASES = {
         # DB name or path to database file if using sqlite3.
         "NAME": "{{ mezzanine_proj_name }}",
         # Not used with sqlite3.
-        "USER": "{{ mezzanine_proj_name }}",
+        "USER": "{{ database_user }}",
         # Not used with sqlite3.
         "PASSWORD": "{{ db_pass }}",
         # Set to empty string for localhost. Not used with sqlite3.
index a71d267..350ae61 100644 (file)
@@ -20,7 +20,8 @@ locale: en_US.UTF-8
 # Eventually, we will pass these as env vars
 database_name: mezzanine
 database_user: mezzanine
-database_password: mezzanine
+database_port: 5432
+db_pass: mezzanine
 secret_key: b495a05c396843b6b47ac944a72c92ed
 nevercache_key: b5d87bb4e17c483093296fa321056bdc
 twitter_access_token_key: 80b557a3a8d14cb7a2b91d60398fb8ce