Add docker-compose configuration for Minecraft server
This commit is contained in:
37
minecraft-paper_itzg/docker-compose.yml
Normal file
37
minecraft-paper_itzg/docker-compose.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: minecraft
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
VERSION: 1.21.1
|
||||
PLUGINS: |
|
||||
https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot
|
||||
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot
|
||||
VIEW_DISTANCE: 15
|
||||
MAX_PLAYERS: 100
|
||||
MEMORY: 12G
|
||||
EXTRA_ARGS: '--world-dir /data/worlds/'
|
||||
# WORLD: /data/worlds
|
||||
# FORCE_WORLD_COPY: "false" # will copy a world from a directory then run if needed # still clones world from /data/worlds to /data/world
|
||||
ports:
|
||||
- "25565:25565"
|
||||
- "19132:19132/udp"
|
||||
- "8123:8123" # For dynmap
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- /docker-containers/minecraft-paper_itzg:/data
|
||||
restart: unless-stopped
|
||||
stdin_open: true # to attach to containers
|
||||
tty: true # also used to attach to containers
|
||||
# network_mode: service:wireguard # To run through vpn service container, in turn UI port must be forwarded inside vpn. No local access unless otherwise defined
|
||||
networks: # Specify network for container
|
||||
homelab:
|
||||
aliases:
|
||||
- mc
|
||||
- mcecon
|
||||
networks: # you have to specify the network 2x. In service, and in this tag area..
|
||||
homelab:
|
||||
external: true # This option causes compose to join the above network instead of making a _default one
|
||||
Reference in New Issue
Block a user