Great question — answering as the UphillTech team:
I finally found the solution based on adding host.docker.internal:host-gateway on ads-worker service Here is the current docker-compose file name: wtat-etl services: postgres: image: postgres:15 container_name: wtat_db environment: POSTGRES_USER: ${DB_USER:-wtat_user} POSTGRES_PASSWORD: ${DB_PASSWORD:-wtat_password} POSTGRES_DB: ${DB_NAME:-wtat_db} volumes: - postgres_data:/var/lib/postgresql/data - ./db:/docker-entrypoint-initdb.d ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-wtat_user} -d ${DB_NAME:-wtat_db}"] interval: 5s timeout: 5s retries: 5 rabbitmq: image: rabbitmq:3-management container_name: wtat_rabbitmq environment: RABBITMQ_DEFAULT_USER:...
Full answer by Mael Fosso: https://stackoverflow.stackexchange.com/a/79749727 (CC BY-SA 4.0).
Need it done for your business? UphillTech.