I am using Postgres for a production system, and I would like to be able to connect to this database remotely to integrate the information with other systems.
My configuration looks classic like follows :
ALLOWED_HOSTS = ['myipgoeshere', 'mydomainnamegoeshere']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'dbname',
'USER': 'dbuser',
'PASSWORD': 'dbpassword',
'HOST': 'localhost'
}
}
Now, if I want to connect to this database from another machine what should I use as hostname on that machine ?
I need to provide information about
Host
Database
Port
User
Password
In my config, host is localhost, but I cannot use this as remote hostname, should we use the IP address instead ? Also will the port be the default postgres one?