From e3daab9d250602f9fc008b71a85980d83685dca2 Mon Sep 17 00:00:00 2001 From: Daniel Ceregatti Date: Sun, 10 Jul 2022 11:24:06 -0700 Subject: [PATCH] Add host mode support so the server shows up in LAN browsers. Keep ports with comments so the old setting can remain as an option. --- docker-compose.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7bd43b2..05a3b50 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,9 @@ version: "3.3" +# This is where the server files, profile, mods, and logs will reside. +# The server script does its best to clean up the copious logs that the +# server creates, but with mods, this volume will grow rather large. +# It's best to keep an eye on its size. volumes: homedir: @@ -7,12 +11,18 @@ services: main: build: . - command: bash -c "/files/dayzserver start" - ports: - - "2302:2302/udp" - - "2303:2303/udp" - - "2304:2304/udp" - - "27016:27016/udp" + # To have the server show up in the LAN tab of the DayZ launcher, + # it must run under host mode. + network_mode: host + # The above is mutually exclusive with the below. If you don't need + # the server to show up on the LAN, comment out the network_mode above + # and uncomment the port mappings below. +# ports: +# - 2302:2302/udp +# - 2303:2303/udp +# - 2304:2304/udp +# - 27016:27016/udp + restart: on-failure volumes: - homedir:/home/user - - ./files/dayzserver:/usr/games/dayzserver + - ./files:/files