I am using Airflow through Docker-compose. The same docker-compose.yml has an image of Postgres as well. The config looks like below -
postgres:
image: postgres:13
ports:
- 5432:5432
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_DB: airflow
volumes:
- postgres-db-volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "airflow"]
interval: 5s
retries: 5
restart: always
This works fine for Airflow and I am also able to access the DAG on the UI.
But I want to access the dockerized Postgres instance from an outside SQL client application like Dbeaver. But I am not able to do that.
Can someone please help me to resolve this?
Note: I already have a separate Postgres instance running on my local.