Commit f05d68fe authored by Michał 'rysiek' Woźniak's avatar Michał 'rysiek' Woźniak
Browse files

inform the user about the IP addresses we are listening on

parent ccee3993
......@@ -25,11 +25,7 @@ $ docker build -t 'webschlocker3' webschlocker3/
$ docker run --rm --name webschlocker-test --link schlocker-test -e WEBSCHLOCKER_CONFIG_SCHLEUDERD_URI="http://schlocker-test:4567/" webschlocker3
```
By default `weschleuder3` listens on port `3000` (you can change this by setting `$WEBSCHLOCKER_BIND_PORT` docker envvar); you can get the IP of the container with:
```
docker inspect -f '{{.NetworkSettings.IPAddress}}' webschlocker-test
```
By default `weschleuder3` listens on port `3000` (you can change this by setting `$WEBSCHLOCKER_BIND_PORT` docker envvar) and will inform you about the IP address it is running on in the output.
Once you have that, navigate your browser to `http://<IP-of-the-container>:3000/` and log-in with user `root@localhost`, password `slingit!`.
......
......@@ -241,7 +241,16 @@ fi
# make sure the envvars are available within su
export WEBSCHLOCKER_BIND_ADDRESS WEBSCHLOCKER_BIND_PORT
# inform the user
echo "+-- webschleuder is available on port $WEBSCHLOCKER_BIND_PORT at:"
if [ "$WEBSCHLOCKER_BIND_ADDRESS" == "0.0.0.0" ]; then
ip -4 addr show scope global | grep inet | sed -r -e 's%inet.? (.+)/[0-9]{2,}.+%\1%'
else
echo " $WEBSCHLOCKER_BIND_ADDRESS"
fi
# do the magic!
echo
echo "+-- executing:"
echo " $*"
exec su -p -c "env PATH=\"$PATH\" $*" "$WEBSCHLOCKER_USER"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment