I am not able to connect to postgres db from app engine flexi environment.
These are the settings I am using:
in django settings file:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': '<db-name>',
'USER': '<user-name>',
'PASSWORD': '<password>',
'HOST': '/cloudsql/<instanse-connection-name>',
'PORT': '5432'
},
}
in app.yaml:
beta_settings:
cloud_sql_instances: <instanse-connection-name>
The error I am getting is this:
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/cloudsql/<instanse-connection-name>/.s.PGSQL.5432"?
Please help.