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.

This commit is contained in:
Daniel Ceregatti 2022-07-10 11:24:06 -07:00
parent 296fc55765
commit e3daab9d25

View file

@ -1,5 +1,9 @@
version: "3.3" 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: volumes:
homedir: homedir:
@ -7,12 +11,18 @@ services:
main: main:
build: . build: .
command: bash -c "/files/dayzserver start" # To have the server show up in the LAN tab of the DayZ launcher,
ports: # it must run under host mode.
- "2302:2302/udp" network_mode: host
- "2303:2303/udp" # The above is mutually exclusive with the below. If you don't need
- "2304:2304/udp" # the server to show up on the LAN, comment out the network_mode above
- "27016:27016/udp" # and uncomment the port mappings below.
# ports:
# - 2302:2302/udp
# - 2303:2303/udp
# - 2304:2304/udp
# - 27016:27016/udp
restart: on-failure
volumes: volumes:
- homedir:/home/user - homedir:/home/user
- ./files/dayzserver:/usr/games/dayzserver - ./files:/files