Skip to content
Snippets Groups Projects
Commit f8e086b9 authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Allows dashes in the domain name

parent 84738915
No related merge requests found
...@@ -13,7 +13,7 @@ RemainAfterExit=yes ...@@ -13,7 +13,7 @@ RemainAfterExit=yes
Environment=URL=%i Environment=URL=%i
ExecStart=/bin/bash -euxc ' \ ExecStart=/bin/bash -euxc ' \
sleep 3; \ sleep 3; \
container_name=`echo ${URL}_web_1 | sed "s/\.//g"`; \ container_name=`echo ${URL}_web_1 | sed "s/\.//g" | sed "s/-//g"`; \
ip=`docker inspect --format \'{{.NetworkSettings.IPAddress}}\' $container_name`; \ ip=`docker inspect --format \'{{.NetworkSettings.IPAddress}}\' $container_name`; \
etcdctl --peers 172.17.42.1:4001 set /services/web/%i \'{"ip":"\'$ip\'", "port":"80"}\';' etcdctl --peers 172.17.42.1:4001 set /services/web/%i \'{"ip":"\'$ip\'", "port":"80"}\';'
ExecStop=-/usr/bin/etcdctl rm /services/web/%i ExecStop=-/usr/bin/etcdctl rm /services/web/%i
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment