Browse Source

feat: improve healthcheck

pull/5/head
Daniel Gibbs 2 years ago
parent
commit
84a651cf6f
  1. 2
      Dockerfile.ubuntu-1804
  2. 2
      Dockerfile.ubuntu-2004
  3. 2
      Dockerfile.ubuntu-2204
  4. 4
      entrypoint.sh

2
Dockerfile.ubuntu-1804

@ -100,7 +100,7 @@ RUN echo "**** Get LinuxGSM Modules ****" \
RUN echo "**** Create Cronjob ****"
RUN (crontab -l 2>/dev/null; echo "*/30 * * * * /linuxgsm/*server update > /dev/null 2>&1") | crontab -
HEALTHCHECK --interval=1m --timeout=1m --start-period=15s --retries=1 CMD [ "/linuxgsm/*server monitor" ]
HEALTHCHECK --interval=1m --timeout=1m --start-period=2m --retries=1 CMD /linuxgsm/*server monitor || exit 1
RUN rm -f /linuxgsm/entrypoint.sh
COPY entrypoint.sh /linuxgsm/entrypoint.sh

2
Dockerfile.ubuntu-2004

@ -99,7 +99,7 @@ RUN echo "**** Get LinuxGSM Modules ****" \
RUN echo "**** Create Cronjob ****"
RUN (crontab -l 2>/dev/null; echo "*/30 * * * * /linuxgsm/*server update > /dev/null 2>&1") | crontab -
HEALTHCHECK --interval=1m --timeout=1m --start-period=15s --retries=1 CMD [ "/linuxgsm/*server monitor" ]
HEALTHCHECK --interval=1m --timeout=1m --start-period=2m --retries=1 CMD /linuxgsm/*server monitor || exit 1
RUN rm -f /linuxgsm/entrypoint.sh
COPY entrypoint.sh /linuxgsm/entrypoint.sh

2
Dockerfile.ubuntu-2204

@ -99,7 +99,7 @@ RUN echo "**** Get LinuxGSM Modules ****" \
RUN echo "**** Create Cronjob ****"
RUN (crontab -l 2>/dev/null; echo "*/30 * * * * /linuxgsm/*server update > /dev/null 2>&1") | crontab -
HEALTHCHECK --interval=1m --timeout=1m --start-period=15s --retries=1 CMD [ "/linuxgsm/*server monitor" ]
HEALTHCHECK --interval=1m --timeout=1m --start-period=2m --retries=1 CMD /linuxgsm/*server monitor || exit 1
RUN rm -f /linuxgsm/entrypoint.sh
COPY entrypoint.sh /linuxgsm/entrypoint.sh

4
entrypoint.sh

@ -71,10 +71,10 @@ echo "updating ${GAMESERVER}"
echo ""
echo "starting ${GAMESERVER}"
./${GAMESERVER} start
sleep 2
sleep 5
./${GAMESERVER} details
sleep 2
tail -f log/script/*
tail -F log/script/*
# with no command, just spawn a running container suitable for exec's
if [ $# = 0 ]; then

Loading…
Cancel
Save