github.com/m-lab/tcp-info@v1.9.0/docker-compose.yaml (about)

     1  version: '3.7'
     2  services:
     3    tcpinfo:
     4      build:
     5        context: .
     6        dockerfile: Dockerfile
     7      volumes:
     8        - ./local:/local
     9      # NOTE: All service containers will use the same network and IP. All ports
    10      # must be configured on the first.
    11      ports:
    12        - target: 9990
    13          published: 9990
    14          protocol: tcp
    15          mode: bridge
    16        - target: 9991
    17          published: 9991
    18          protocol: tcp
    19          mode: bridge
    20      command:
    21        - -prometheusx.listen-address=:9990
    22        - -output=/local/tcpinfo
    23        - -tcpinfo.eventsocket=/local/tcpevents.sock
    24        - -anonymize.ip=none
    25  
    26    example-eventsocket-client:
    27      build:
    28        context: .
    29        dockerfile: Dockerfile.example
    30      volumes:
    31        - ./local:/local
    32      network_mode: "service:tcpinfo"
    33      deploy:
    34        # NOTE: container may fail on startup if it tries to read a
    35        # socket that the above services are not yet listening on.
    36        # So, allow restart.
    37        restart_policy:
    38          condition: any
    39          delay: 5s
    40      command:
    41        - -tcpinfo.eventsocket=/local/tcpevents.sock