add port forwarding
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
BIND_PORT=${BIND_PORT:-80}
|
||||
BIND_ADDRESS=${BIND_ADDRESS:-127.0.0.1}
|
||||
|
||||
if ! [ -d /var/run/yggdrasil ]
|
||||
then
|
||||
install -d -o yggdrasil -g yggdrasil /run/yggdrasil /var/run/yggdrasil
|
||||
@@ -13,6 +16,13 @@ then
|
||||
fi
|
||||
|
||||
|
||||
# Port forwarding to another docker service
|
||||
while sleep 1;
|
||||
do
|
||||
socat TCP6-LISTEN:$BIND_PORT,fork,forever,reuseaddr TCP4:$BIND_ADDRESS:$BIND_PORT
|
||||
done
|
||||
|
||||
|
||||
# Show node address
|
||||
until yggdrasilctl getself | grep -v "^[[:digit:]]"
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user