Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

icgood/proxy-protocol

Docker image that proxies host ports to swarm services with PROXY protocol headers, using proxyprotocol-server.

The intention is to bind to host ports and proxy connections to Docker's built-in load balancers. The services should expect a PROXY protocol header.

Usage

First, create a new service in your docker-compose.yml:

  proxy:
    image: icgood/proxy-protocol
    deploy:
      mode: global

The mode: global configuration means the service will run a single instance on each node.

Declare one or more host port bindings:

    ports:
      - target: 143
        published: 143
        protocol: tcp
        mode: host
      - target: 4190
        published: 4190
        protocol: tcp
        mode: host

Finally, modify the service endpoint to proxy the ports to a backend service:

    entrypoint: >-
      proxyprotocol-server
        --service :143 imap-server:143
        --service :4190 imap-server:4190

In the above example, another service named imap-server should be listening on ports 143 and 4190.