Skip to content

Commit

Permalink
feat: improve healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Oct 27, 2022
1 parent 31cb66b commit 84a651c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.ubuntu-1804
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ubuntu-2004
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ubuntu-2204
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84a651c

Please sign in to comment.