diff --git a/ea/Dockerfile b/ea/Dockerfile index 9e74ae4..eff0415 100644 --- a/ea/Dockerfile +++ b/ea/Dockerfile @@ -22,9 +22,7 @@ COPY dockerstart.sh / WORKDIR /home/container -ENV PORT=8192 ENV HOME=/home/container -EXPOSE 8192/udp # Set entrypoint CMD ["bash", "/dockerstart.sh"] diff --git a/ea/dockerstart.sh b/ea/dockerstart.sh index 5a3e525..d3997a9 100755 --- a/ea/dockerstart.sh +++ b/ea/dockerstart.sh @@ -6,7 +6,11 @@ npm install pm2 start bot.js cd /home/container/server -echo 'Starting server on' $PORT +echo 'Starting server on port ' "$PORT" + +MODIFIED_STARTUP=`echo ${STARTUP} | perl -pe 's@\{\{(.*?)\}\}@$ENV{$1}@g'` +echo "Startup: ${MODIFIED_STARTUP}" +eval stdbuf -oL -i0 ${MODIFIED_STARTUP} # Using stdbuf to force unbuffered output since server is not directly connected to terminal and is buffering output -stdbuf -oL ./server -allow-server-runas-root -port $PORT +#stdbuf -oL ./server -port "$PORT"