Fixes for subdomain

This commit is contained in:
pierreozoux 2015-05-09 23:01:56 +01:00
parent c33d9a9862
commit dcfb8a78af

View file

@ -13,7 +13,7 @@ RemainAfterExit=yes
Environment=URL=%i
ExecStart=/bin/bash -euxc ' \
sleep 3; \
container_name=`echo ${URL}_web_1 | sed "s/\.//"`; \
container_name=`echo ${URL}_web_1 | sed "s/\.//g"`; \
ip=`docker inspect --format \'{{.NetworkSettings.IPAddress}}\' $container_name`; \
etcdctl --peers 172.17.42.1:4001 set /services/web/%i \'{"ip":"\'$ip\'", "port":"80"}\';'
ExecStop=-/usr/bin/etcdctl rm /services/web/%i