Skip to content
Mint Service Desk Documentation centre

Reverse proxy on the host machine

Mint Service Desk 3.4.2 user manual.

Changes in services.yml

Update the service definitions in services.yml before running the reverse proxy on the host.

  1. Expose the ports of the Frontend, Gateway and Auth services directly. For example:
gateway:
   image: mint/gateway:latest
   ...
   ports:
     - port_on_which_we_want_to_start_service:80
  1. Remove the Reverse Proxy service definition from services.yml.

Note: Use the ports defined here when configuring the reverse proxy. After starting the stack, these services are directly accessible on the host.

Configuring the reverse proxy

This example uses nginx as the HTTP reverse proxy on the host. Start with the configuration used by the built-in Reverse Proxy service.

Docker Swarm uses an overlay network. Services on that network are not accessible at localhost. Use ip addr to find the address used to access the stack.

Example output:

...
5: docker_gwbridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:98:4e:fe:bc brd ff:ff:ff:ff:ff:ff
    inet 172.21.0.1/16 brd 172.21.255.255 scope global docker_gwbridge
       valid_lft forever preferred_lft forever
    inet6 fe80::42:98ff:fe4e:febc/64 scope link
       valid_lft forever preferred_lft forever
...

Use the address assigned to docker_gwbridge when configuring the reverse proxy. The address given in this example is 127.21.0.1.

In nginx.conf, replace the built-in Reverse Proxy destination addresses. For example, replace http://gateway with http://ip_address_docker_gwbridge:the_port_where_the_service_was_exposed. Update the other location blocks in the same way.