Skip to content

Commit 959b7cc

Browse files
Matthew Fishermboersma
authored andcommitted
fix(settings): default to empty host environment variable
If you do not supply a host variable, Then psycopg2 will connect using a Unix socket in the same manner as psql. Surprisingly, when you specify a HOST, psycopg2 will connect with TCP/IP, which requires a password. This broke my environment with the following: OperationalError: fe_sendauth: no password supplied See: http://stackoverflow.com/a/23871618
1 parent 2046014 commit 959b7cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rootfs/deis/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@
330330
'NAME': os.environ.get('DEIS_DATABASE_NAME', 'deis'),
331331
'USER': os.environ.get('DEIS_DATABASE_USER', ''),
332332
'PASSWORD': os.environ.get('DEIS_DATABASE_PASSWORD', ''),
333-
'HOST': os.environ.get('DEIS_DATABASE_SERVICE_HOST', '127.0.0.1'),
333+
'HOST': os.environ.get('DEIS_DATABASE_SERVICE_HOST', ''),
334334
'PORT': os.environ.get('DEIS_DATABASE_SERVICE_PORT', 5432),
335335
# randomize test database name so we can run multiple unit tests simultaneously
336336
'TEST_NAME': "unittest-{}".format(''.join(

0 commit comments

Comments
 (0)