minecraft: add no-new-privileges and only enable rcon when web is active

This commit is contained in:
saibotk 2021-11-30 21:01:45 +01:00
parent fd9616ddbc
commit 84aca4fd3b
Signed by: saibotk
GPG key ID: 67585F0065E261D5

View file

@ -29,9 +29,11 @@ services:
{% endfor %} {% endfor %}
volumes: volumes:
- "{{ minecraft_data_location }}:/data" - "{{ minecraft_data_location }}:/data"
security_opt:
- no-new-privileges
environment: environment:
EULA: "TRUE" EULA: "TRUE"
ENABLE_RCON: "true" ENABLE_RCON: "{{ minecraft_enable_rcon_web | bool | lower }}"
RCON_PASSWORD: "{{ minecraft_rcon_password }}" RCON_PASSWORD: "{{ minecraft_rcon_password }}"
RCON_PORT: 28016 RCON_PORT: 28016
# enable env variable replacement # enable env variable replacement