diff --git a/templates/eventstore/0/docker-compose.yml b/templates/eventstore/0/docker-compose.yml index 0c8256d..2a41e51 100644 --- a/templates/eventstore/0/docker-compose.yml +++ b/templates/eventstore/0/docker-compose.yml @@ -7,8 +7,8 @@ services: - -c - 'grep -q -F "IntIpAdvertiseAs: $$(hostname -i)" /etc/eventstore/eventstore.conf || echo "IntIpAdvertiseAs: $$(hostname -i)" >> /etc/eventstore/eventstore.conf && - grep -q -F "ExtIpAdvertiseAs: $$(hostname -i)" /etc/eventstore/eventstore.conf || - echo "ExtIpAdvertiseAs: $$(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 && /entrypoint.sh' environment: @@ -18,6 +18,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) ports: - ${external_http_port}:${external_http_port}/tcp