django - How to link from docker-compose to Amazon RDS -
my docker-compose.yml looks this:
django: build: . user: django links: # link amazon rds? command: /gunicorn.sh env_file: config/settings/.env nginx: build: ./compose/nginx links: - django ports: - "0.0.0.0:80:80"
how link django container amazon rds, has url like: example.blahblahblah.eu-west-1.rds.amazonaws.com:5432
in case, don't have define "link"; database service running, need do, configure django app connect host.
i don't have experience django, based on example in docker-compose documentation, like;
databases = { 'default': { 'engine': 'django.db.backends.postgresql_psycopg2', 'name': 'postgres', 'user': 'postgres', 'host': 'example.blahblahblah.eu-west-1.rds.amazonaws.com', 'port': 5432, } }
Comments
Post a Comment