diff --git a/Dockerfile b/Dockerfile index 80cf71b..27917c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/docker-compose.yaml b/docker-compose.yaml index 4ae1b32..47db20c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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