Home:ALL Converter>How to connect Adminer when running in Docker container and DB is Postgres AWS RDS?

How to connect Adminer when running in Docker container and DB is Postgres AWS RDS?

Ask Time:2019-06-14T01:54:58         Author:Chris

Json Formatter

I'm trying to connect to adminer on port 8080 that is running in a docker container which is running in an EC2 instance. The database is running in an AWS RDS instance. Both are running in the same VPC. I can connect via the cli to the RDS instance but I can't use my browser to connect to RDS through adminer running domain.com:8080. I don't know if the security groups are setup correctly and I don't really know what needs to be added to the security groups. Any advice? Thanks in advance.

adminer:
  build:
    context: ../ 
    dockerfile: ./path/to/adminer/Dockerfile
  ports:
    - "8080:8080"
  environment:
    - POSTGRES_CONNECTION=psql
    - POSTGRES_HOST=**********
    - POSTGRES_DB=**********
    - POSTGRES_USER=**********
    - POSTGRES_PASSWORD=**********
    - POSTGRES_PORT=5432
 networks:
    - backend

Author:Chris,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/56586105/how-to-connect-adminer-when-running-in-docker-container-and-db-is-postgres-aws-r
yy