added game name in params

This commit is contained in:
bvn13 2024-12-07 23:22:07 +03:00
parent 37f8a09530
commit a956c7efbd
2 changed files with 5 additions and 3 deletions

View File

@ -2,7 +2,8 @@
FROM ghcr.io/linuxserver/minetest:latest
ARG no-cache cached
#ARG GAME_NAME
#ENV CLI_ARGS="--gameid $GAME_NAME"
RUN apk add --no-cache luajit lua5.1-socket
@ -13,7 +14,7 @@ RUN apk add --no-cache luajit lua5.1-socket
RUN echo "#!/usr/bin/env bash" > /usr/local/bin/start_luanti
#RUN echo "export IPV4=\$(/usr/local/bin/ipv4)" >> /usr/local/bin/start_luanti
#RUN echo "echo \$IPV4" >> /usr/local/bin/start_luanti
RUN echo "/usr/bin/luantiserver --config /config/.minetest/main-config/minetest.conf" >> /usr/local/bin/start_luanti
RUN echo "/usr/bin/luantiserver --config /config/.minetest/main-config/minetest.conf --gameid \$GAME_NAME --worldname \$GAME_NAME" >> /usr/local/bin/start_luanti
RUN chmod o+x /usr/local/bin/start_luanti
ENTRYPOINT ["/usr/local/bin/start_luanti"]

View File

@ -11,10 +11,11 @@ services:
update_config:
parallelism: 2
environment:
GAME_NAME: ${GAME_NAME}
PUID: '1000'
TZ: Europe/Moscow
PGID: '1000'
CLI_ARGS: '--gameid minetest_game --port 30000'
#CLI_ARGS: '--gameid minetest_game --port 30000'
ports:
- 29999:29999
- 30000:30000/udp