I've started my docker image as follows:
docker run --name fnf-postgis -e POSTGRES_DB=fnf -e POSTGRES_USER=fnfuser -e POSTGRES_PASSWORD=fnf2pwd -p5432:5432 -d mdillon/postgis:11
and i've set up my django db config:
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'fnf',
'USER': 'fnfuser',
'PASSWORD': 'fnf2pwd',
'host': '',
'port': 5432,
However, running makemigrations
give this error:
psycopg2.OperationalError: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
but I can successfully connect to the container from pycharm
pycharm
database conecction settings. – Brown Bear