In this case, you do not need to define a “link”; the database service is already running, so all you have to do is configure your django application to connect to this host.
I have no experience with django, but based on the example in the docker documentation documentation , it will look something like this:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
'HOST': 'example.blahblahblah.eu-west-1.rds.amazonaws.com',
'PORT': 5432,
}
}
source
share