2 Commits 2fdbdbeec9 ... 46f40071fd

Author SHA1 Message Date
  Apollo 46f40071fd Fixed Dockerfile so it builds 3 days ago
  Apollo 0f16e89bb1 Added a POC for a better docker server image 4 days ago

+ 9 - 1
README.md

@@ -1,2 +1,10 @@
-# luanti_server
+# Luanti Server
+
+## Setup 1-2-3
+
+1. Grab a game, put it in data/games
+2. Get your mods, put them in data/mods
+3. Build a world\* with the client, then copy it into the data/worlds
+
+\* Or use one of the included worlds
 
 

+ 0 - 0
data/debug.txt


+ 0 - 0
data/games/place_games_here.txt


+ 73 - 0
data/minetest.conf

@@ -0,0 +1,73 @@
+# Gamemode
+creative_mode = false
+enable_damage = true
+
+# Player Versus Player
+enable_pvp = true
+
+# You should configure port number via you're docker-compose.yml
+bind_address = 0.0.0.0
+port = 30000
+
+# Max Users
+max_users = 4
+
+# Server Credentials (Only when we use server_annouce)
+# (I think server_annouce needs to open 8080 to send stats)
+server_annouce = false
+server_name = "A Luanti Server"
+server_description = "A Luanti Server\nCome Play!"
+server_motd = "A Luanti Server\nWelcome to our world"
+
+# Server Optimizations (Useful for low-end environments, comment out or change)
+# https://forum.luanti.net/viewtopic.php?f=10&t=1825
+max_block_send_distance = 6
+max_simultaneous_block_sends_per_client = 7
+max_simultaneous_block_sends_server_total = 7000
+active_block_range = 2
+server_map_save_interval = 14.3
+
+# Hide name tags beyond a distance
+player_transfer_distance = 1
+unlimited_player_transfer_distance = false
+
+# Spawn
+# (Enter your world, use F3 to get coordinates, and round up to nearest whole)
+# static_spawnpoint = 
+
+# Intial Stuff
+give_initial_stuff = false
+# This is game and mod specific/depended
+initial_stuff = default:torch 2,farming:bread 2
+
+# Privileges (privs)
+default_privs = interact, shout
+
+# Owner
+name = Admin
+
+# Disable log rollover (This way you keep you're logs)
+debug_log_size_max = -1
+
+# Messages for server events
+kick_msg_shutdown = "I was asked to shutdown, but I'll be back again"
+kick_msg_crash = "Oh no! I crashed... don't worry, I'll be back soon"
+ask_reconnect_on_crash = true
+
+# Security Option
+disallow_empty_passwords = true
+
+# Trusted mods (they get access to special stuff)
+secure.trusted_mods = skinsdb
+
+# More server optimizations from a mod
+mesecon.luacontroller_lightweight_interrupts = true
+
+# bridger trusses
+bridger_enable_trusses = true
+
+## Mod Settings ##
+
+# [moreblocks/stairsplus] Show every stair varient in creative
+moreblocks.stairsplus_in_creative_inventory = false
+

+ 0 - 0
data/mods/place_mods_here.txt


+ 0 - 0
data/worlds/place_worlds_here.txt


+ 21 - 0
docker-compose.yml

@@ -0,0 +1,21 @@
+
+services:
+        luanti:
+                image: luanti
+                build: luanti
+                ports:
+                        - "30000:30000/udp"
+                volumes:
+                        - ./data/minetest.conf:/minetest/minetest.conf
+                        - ./data/worlds:/minetest/worlds
+                        - ./data/games:/minetest/games
+                        - ./data/mods:/minetest/mods
+                        - ./data/debug.txt:/minetest/debug.txt
+                user: "1000:1000"
+                tty: true
+                stdin_open: true
+                restart: unless-stopped
+                logging:
+                        options:
+                                max-size: 2m
+

+ 46 - 0
luanti/Dockerfile

@@ -0,0 +1,46 @@
+from debian:buster-slim as builder
+
+WORKDIR /minetest
+
+ARG VERSION="5.10.0"
+
+RUN apt-get update && \
+    apt-get install -y \
+        g++ make libc6-dev \
+        cmake libbz2-dev libpng-dev \
+        libjpeg-dev libxxf86vm-dev libgl1-mesa-dev \
+        libsqlite3-dev libogg-dev libvorbis-dev \
+        libopenal-dev libcurl4-gnutls-dev libfreetype6-dev \
+        zlib1g-dev libgmp-dev libjsoncpp-dev \
+        libzstd-dev libluajit-5.1-dev gettext \
+        git
+
+RUN git clone https://github.com/minetest/minetest minetest && \
+    cd minetest && \
+    git checkout ${VERSION}
+
+RUN chdir minetest && \
+    cmake . -DRUN_IN_PLACE=TRUE -DBUILD_SEVER=TRUE -DBUILD_CLIENT=FALSE && \
+    make -j$(nproc)
+
+from debian:buster-slim as final
+
+WORKDIR /luanti
+
+RUN apt-get update && \
+    apt-get install -y \
+        libsqlite3-0 libcc1-0 libgmpxx4ldbl \
+        librtmp1 libcurl3-gnutls libzstd-dev \
+        libjsoncpp-dev libluajit-5.1 gettext \
+    && apt-get clean && rm -rf /var/lib/apt/lists/*
+
+COPY --from=builder /minetest/minetest/bin/luantiserver /luanti/bin/server
+
+COPY --from=builder /minetest/minetest/textures /luanti/textures
+COPY --from=builder /minetest/minetest/builtin /luanti/builtin
+
+EXPOSE 30000
+#EXPOSE 8080
+
+CMD ["./bin/server", "--worldname", "world"]
+