From bc8e51d5ed54e004074228e09c05d8cc2e285036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=AArome=20Rx?= Date: Mon, 27 Feb 2017 17:01:22 +0100 Subject: [PATCH] finally public IPs !! --- templates/eventstore/0/docker-compose.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/eventstore/0/docker-compose.yml b/templates/eventstore/0/docker-compose.yml index 2a41e51..d72440f 100644 --- a/templates/eventstore/0/docker-compose.yml +++ b/templates/eventstore/0/docker-compose.yml @@ -5,7 +5,10 @@ services: entrypoint: /bin/bash command: - -c - - 'grep -q -F "IntIpAdvertiseAs: $$(hostname -i)" /etc/eventstore/eventstore.conf || + - ' + apt-get install curl && + export HOST_PUBLIC_IP=$$(curl http://rancher-metadata/2015-12-19/self/host/agent_ip) && + grep -q -F "IntIpAdvertiseAs: $$(hostname -i)" /etc/eventstore/eventstore.conf || echo "IntIpAdvertiseAs: $$(hostname -i)" >> /etc/eventstore/eventstore.conf && grep -q -F "ExtIpAdvertiseAs: $$HOST_PUBLIC_IP" /etc/eventstore/eventstore.conf || echo "ExtIpAdvertiseAs: $$HOST_PUBLIC_IP" >> /etc/eventstore/eventstore.conf && @@ -18,7 +21,7 @@ services: - EVENTSTORE_EXT_HTTP_PREFIXES=http://*:${external_http_port}/ - EVENTSTORE_EXT_HTTP_PORT=${external_http_port} - EVENTSTORE_EXT_TCP_PORT=${external_tcp_port} - - HOST_PUBLIC_IP=$(scw-metadata PUBLIC_IP_ADDRESS) + #- HOST_PUBLIC_IP='$(scw-metadata PUBLIC_IP_ADDRESS)' ports: - ${external_http_port}:${external_http_port}/tcp