minecraft: Allow opening additional ports

This commit is contained in:
saibotk 2021-11-30 21:01:05 +01:00
parent db186d3f79
commit fd9616ddbc
Signed by: saibotk
GPG key ID: 67585F0065E261D5
2 changed files with 9 additions and 0 deletions

View file

@ -48,6 +48,12 @@ minecraft_rcon_password: "CHANGEME"
# The minecraft container configuration as environment variables (see https://github.com/itzg/docker-minecraft-server)
minecraft_config: []
# This config allows to add new portbindings to the minecraft server, eg. for voicechat.
#
# Example entry:
# - 24454:24454/udp
minecraft_additional_ports: []
# IPv6 ULA config for the bridge network used by docker-ipv6-nat
minecraft_ipv6:
enabled: false

View file

@ -24,6 +24,9 @@ services:
image: docker.io/itzg/minecraft-server:{{ minecraft_image_tag }}
ports:
- "{{ minecraft_server_port }}:25565"
{% for item in minecraft_additional_ports %}
- "{{ item }}"
{% endfor %}
volumes:
- "{{ minecraft_data_location }}:/data"
environment: