From eb8c9bae9e682969b3aad064ddfc95565e648fde Mon Sep 17 00:00:00 2001
From: rjshrjndrn <rjshrjndrn@gmail.com>
Date: Mon, 15 Jul 2019 14:58:06 +0530
Subject: [PATCH] Issue #000 feat: Running nginx in host mode as global
 container

---
 ansible/roles/stack-proxy/templates/stack-proxy.yml | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/ansible/roles/stack-proxy/templates/stack-proxy.yml b/ansible/roles/stack-proxy/templates/stack-proxy.yml
index eee187d97..cd155ba14 100644
--- a/ansible/roles/stack-proxy/templates/stack-proxy.yml
+++ b/ansible/roles/stack-proxy/templates/stack-proxy.yml
@@ -3,11 +3,18 @@ version: '3.3'
 services:
   proxy:
     image: "{{hub_org}}/{{image_name}}:{{image_tag}}"
+    # This is a workaround for remote ip address is not visible nginx
     ports:
-      - "443:443"
-      - "80:80"
+      - mode: host
+        target: 80
+        published: 80
+        protocol: TCP
+      - mode: host
+        target: 443
+        published: 443
+        protocol: TCP
     deploy:
-      replicas: {{ proxy_replicas }}
+      mode: global
       resources:
         reservations:
           memory: "{{ proxy_reservation_memory }}"
-- 
GitLab