docker-compose.yml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. version: '3'
  2. # docker-compose up -d
  3. services:
  4. minecraft-server:
  5. ports:
  6. - "11611:25565"
  7. environment:
  8. EULA: "true"
  9. VERSION: "1.16.1"
  10. # on Type Forge, by default the container will run the RECOMMENDED version of Forge server
  11. #TYPE: FORGE
  12. # ...but you can also choose to run a specific version with:
  13. #FORGEVERSION: 31.2.36
  14. # By default the server configuration will be created and set based on the following environment variables,
  15. # but only the first time the server is started.
  16. # If the server.properties file already exists, the values in them will not be changed.
  17. # If you would like to override the server configuration each time the container starts up,
  18. # you can set the OVERRIDE_SERVER_PROPERTIES environment variable like:
  19. OVERRIDE_SERVER_PROPERTIES: "true"
  20. SERVER_NAME: MC-1.16.1
  21. SERVER_PORT: 25565
  22. DIFFICULTY: 0
  23. #WHITELIST: user1,user2
  24. OPS: Reaver1202,SuminoSempai
  25. #ICON: http://..../some/image.png
  26. # RCRON
  27. #ENABLE_RCON: "true"
  28. #RCON_PASSWORD: testing
  29. #RCON_PORT: 25575
  30. # By default the query port will be 25565 (UDP)
  31. #ENABLE_QUERY: "true"
  32. MAX_PLAYERS: 5
  33. # maximum possible size in blocks, expressed as a radius, that the world border can obtain
  34. #MAX_WORLD_SIZE: 10000
  35. ALLOW_NETHER: "true"
  36. ANNOUNCE_PLAYER_ACHIEVEMENTS: "true"
  37. ENABLE_COMMAND_BLOCK: "true"
  38. # Force players to join in the default game mode.
  39. # "false" - Players will join in the gamemode they left in.
  40. # "true" - Players will always join in the default gamemode.
  41. FORCE_GAMEMODE: "false"
  42. # Defines whether structures (such as villages) will be generated.
  43. # "false" - Structures will not be generated in new chunks.
  44. # "true" - Structures will be generated in new chunks.
  45. GENERATE_STRUCTURES: "true"
  46. # If set to "true", players will be set to spectator mode if they die.
  47. HARDCORE: "false"
  48. # If set to "false", the server will not send data to snoop.minecraft.net server.
  49. SNOOPER_ENABLED: "false"
  50. MAX_BUILD_HEIGHT: 256
  51. # The maximum number of milliseconds a single tick may take before the server watchdog stops the server with the message,
  52. # A single server tick took 60.00 seconds (should be max 0.05); Considering it to be crashed, server will forcibly shutdown.
  53. # Once this criteria is met, it calls System.exit(1). Setting this to -1 will disable watchdog entirely
  54. MAX_TICK_TIME: 60000
  55. # Determines if animals will be able to spawn.
  56. SPAWN_ANIMALS: "true"
  57. # Determines if monsters will be spawned.
  58. SPAWN_MONSTERS: "true"
  59. # Determines if villagers will be spawned.
  60. SPAWN_NPCS: "true"
  61. # Sets the area that non-ops can not edit (0 to disable)
  62. SPAWN_PROTECTION: 0
  63. # Sets the amount of world data the server sends the client, measured in chunks
  64. # in each direction of the player (radius, not diameter). It determines the server-side viewing distance.
  65. VIEW_DISTANCE: 10
  66. #SEED: 2101715061381480750
  67. # By default, Minecraft servers are configured to run in Survival mode.
  68. # creative, survival, adventure, spectator
  69. MODE: survival
  70. # message of the day, shown below each server entry in the UI
  71. MOTD: Have a nice day! Tobi
  72. # By default, servers are created with player-vs-player (PVP) mode enabled.
  73. PVP: "false"
  74. # DEFAULT, FLAT, LARGEBIOMES, AMPLIFIED, CUSTOMIZED, BUFFET
  75. LEVEL_TYPE: DEFAULT
  76. #LEVEL_TYPE: biomesoplenty
  77. #### MODS
  78. # Like the WORLD option above, you can specify the URL of a "mod pack" to download and install into mods for Forge or plugins
  79. # for Bukkit/Spigot. To use this option pass the environment variable MODPACK, such as the example below.
  80. # NOTE: The referenced URL must be a zip file with one or more jar files at the top level of the zip archive. Make sure the
  81. # jars are compatible with the particular TYPE of server you are running.
  82. #MODPACK: http://www.example.com/mods/modpack.zip
  83. # When the option above is specified (MODPACK) you can also instruct script to delete old mods/plugins prior to installing
  84. # new ones. This behaviour is desirable in case you want to upgrade mods/plugins from downloaded zip file.
  85. #REMOVE_OLD_MODS: true
  86. # You may also download individual mods using the MODS environment variable and supplying the URL to the jar files.
  87. # Multiple mods/plugins should be comma separated.
  88. #MODS: https://www.example.com/mods/mod1.jar,https://www.example.com/mods/mod2.jar
  89. # WARNING: All content of the mods or plugins directory will be deleted before unpacking new content from the MODPACK or MODS.
  90. # Allows users to use flight on your server while in Survival mode, if they have a mod that provides flight installed.
  91. ALLOW_FLIGHT: "true"
  92. # Memory Limit
  93. MEMORY: 4G
  94. INIT_MEMORY: 4G
  95. MAX_MEMORY: 4G
  96. # JVM Options
  97. # General JVM options can be passed to the Minecraft Server invocation by passing a JVM_OPTS environment variable.
  98. # Options like -X that need to proceed general JVM options can be passed via a JVM_XX_OPTS environment variable.
  99. # For some cases, if e.g. after removing mods, it could be necessary to startup minecraft with an additional
  100. # -D parameter like -Dfml.queryResult=confirm. To address this you can use the environment variable JVM_DD_OPTS,
  101. # which builds the params from a given list of values separated by space, but without the -D prefix. To make things
  102. # running under systems (e.g. Plesk), which doesn't allow = inside values, a : (colon) could be used instead.
  103. # The upper example would look like this: JVM_DD_OPTS=fml.queryResult:confirm, and will be converted to -Dfml.queryResult=confirm.
  104. image: itzg/minecraft-server:latest
  105. volumes:
  106. - "/home/tobi/docker-minecraft_16-1/mc-1.16.1:/data"
  107. container_name: mc1161
  108. tty: true
  109. stdin_open: true