Switch staging to use postgres

(imported from commit fde5bf54a42c6be95fe2436094d7ac1626c29683)
This commit is contained in:
Zev Benjamin 2012-12-12 17:07:37 -05:00
parent 4108f2f817
commit 4788443e60
1 changed files with 15 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import platform
DEPLOYED = (('humbughq.com' in platform.node())
or os.path.exists('/etc/humbug-server'))
STAGING_DEPLOYED = (platform.node() == 'staging.humbughq.com')
DEBUG = not DEPLOYED
TEMPLATE_DEBUG = DEBUG
@ -31,7 +32,20 @@ DATABASES = {
},
}
if DEPLOYED:
if STAGING_DEPLOYED or platform.node() == 'postgres.humbughq.com':
DATABASES["default"] = {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'humbug',
'USER': 'humbug',
'PASSWORD': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'HOST': '10.254.4.99',
'OPTIONS': {
# Note that 'require' does NOT check certificates. You
# need 'verify-full' for that.
'sslmode': 'require',
},
}
elif DEPLOYED:
DATABASES['default'] = {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {