I use Ubuntu 18, have an non-container Postgres database, installed on my machine, that I would like to connect from Docker container.
My current docker-compose.yaml:
version: "3"
services:
    ws-server:
        image: ws-server
        networks:
            - net-ws
        ports:
            - 2020:2020
    shortest-path:
        image: ws-client
        networks:
            - net-ws
        expose:
            - 5000
networks:
    net-ws:
Here I would like to add a configuration to be able to reach host database.
When I run my application with:
docker run --rm -it --network=host ws-server
then all works properly.
So how to configure docker-compose.yaml to access host Postgres in Ubuntu 18?
