Skip to content

Commit 811bce7

Browse files
committed
feat: add option to enable developer mode
1 parent 7766c74 commit 811bce7

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

Dockerfile.ubuntu-1804

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ENV LGSM_LOGDIR=/data/log
1616
ENV LGSM_SERVERFILES=/data/serverfiles
1717
ENV LGSM_DATADIR=/data/data
1818
ENV LGSM_CONFIG=/data/config-lgsm
19+
ENV LGSM_DEV=false
1920
ENV GAMESERVER=jc2server
2021
ENV UPDATE_CHECK=60
2122
ENV USER=linuxgsm

Dockerfile.ubuntu-2004

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ENV LGSM_LOGDIR=/data/log
1616
ENV LGSM_SERVERFILES=/data/serverfiles
1717
ENV LGSM_DATADIR=/data/data
1818
ENV LGSM_CONFIG=/data/config-lgsm
19+
ENV LGSM_DEV=false
1920
ENV GAMESERVER=jc2server
2021
ENV UPDATE_CHECK=60
2122
ENV USER=linuxgsm

Dockerfile.ubuntu-2204

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ENV LGSM_LOGDIR=/data/log
1616
ENV LGSM_SERVERFILES=/data/serverfiles
1717
ENV LGSM_DATADIR=/data/data
1818
ENV LGSM_CONFIG=/data/config-lgsm
19+
ENV LGSM_DEV=false
1920
ENV GAMESERVER=jc2server
2021
ENV UPDATE_CHECK=60
2122
ENV USER=linuxgsm
@@ -104,7 +105,7 @@ RUN echo "**** Add linuxgsm user ****" \
104105
&& chmod 0440 /etc/sudoers.d/$USER \
105106
&& chown $USER:$USER /data
106107

107-
HEALTHCHECK --interval=1m --timeout=1m --start-period=2m --retries=1 CMD /app/entrypoint-healthcheck.sh || exit 1
108+
HEALTHCHECK --interval=1m --timeout=1m --start-period=5m --retries=1 CMD /app/entrypoint-healthcheck.sh || exit 1
108109

109110
## Download linuxgsm.sh
110111
RUN echo "**** Download linuxgsm.sh ****" \

entrypoint-user.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ exit_handler_user() {
1212
echo -e "Loading exit handler"
1313
trap exit_handler_user SIGQUIT SIGINT SIGTERM
1414

15+
16+
1517
# Setup game server
1618
if [ ! -f "${GAMESERVER}" ]; then
1719
echo -e ""
@@ -30,6 +32,12 @@ elif [ -d "/app/lgsm/modules" ]; then
3032
chmod +x /app/lgsm/modules/*
3133
fi
3234

35+
# Enable developer mode
36+
if [ "${LGSM_DEV}" == "true" ]; then
37+
echo -e "developer mode enabled"
38+
./"${GAMESERVER}" developer
39+
fi
40+
3341
# Install game server
3442
if [ -z "$(ls -A -- "/data/serverfiles" 2> /dev/null)" ]; then
3543
echo -e ""

0 commit comments

Comments
 (0)