diff --git a/templates/haproxy-docker-stack.yml.j2 b/templates/haproxy-docker-stack.yml.j2
index f1989d4..54a26c8 100644
--- a/templates/haproxy-docker-stack.yml.j2
+++ b/templates/haproxy-docker-stack.yml.j2
@@ -58,6 +58,11 @@ services:
       - target: {{ docker_swarm_haproxy_swarm_port }}
         published: {{ docker_swarm_haproxy_swarm_port }}
         protocol: tcp
+{% if docker_swarm_haproxy_shinyproxy_metrics is defined and docker_swarm_haproxy_shinyproxy_metrics %}
+      - target: 9090
+        published: 9090
+        protocol: tcp
+{% endif %}
 {% if docker_swarm_haproxy_installation_type == 'mesh' %}
         mode: ingress
 {% else %}