This commit is contained in:
Thijn Geurts 2024-09-10 08:30:06 +02:00
parent bb2c817c0d
commit 0c271ad5f4
2 changed files with 6 additions and 4 deletions

View File

@ -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"]

View File

@ -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"