From 5fe279733d076719d534bfbbf377be1da3448b87 Mon Sep 17 00:00:00 2001 From: Klagarge Date: Mon, 26 Feb 2024 09:08:06 +0100 Subject: [PATCH 1/4] add minecraft --- docker-compose.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 8429efc..2052293 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -90,3 +90,21 @@ services: - "traefik.http.routers.ollama-webui-https.service=ollama-webui" - "traefik.http.routers.ollama-webui-https.middlewares=ollama-webui-auth" - "traefik.http.middlewares.ollama-webui-auth.basicauth.usersfile=/etc/traefik/authorized_users" + + minecraft: + image: 'itzg/minecraft-server' + restart: unless-stopped + stdin_open: true + tty: true + ports: + - "25565:25565" + volumes: + - "mc:/data" + environment: + EULA: "TRUE" + ENABLE_AUTOPAUSE: "TRUE" + OVERRIDE_SERVER_PROPERTIES: "TRUE" + MAX_TICK_TIME: "-1" + AUTOPAUSE_TIMEOUT_INIT: "30" + AUTOPAUSE_TIMEOUT_EST: "10" + From 3f98d68a84f60a78b6b28cf7e6848d2d84adb890 Mon Sep 17 00:00:00 2001 From: Klagarge Date: Mon, 26 Feb 2024 09:19:28 +0100 Subject: [PATCH 2/4] update to forge --- docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2052293..7e9d0d1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -99,9 +99,12 @@ services: ports: - "25565:25565" volumes: - - "mc:/data" + - "./mc:/data" + - "./mods:/mods:ro" + environment: EULA: "TRUE" + TYPE: "FORGE" ENABLE_AUTOPAUSE: "TRUE" OVERRIDE_SERVER_PROPERTIES: "TRUE" MAX_TICK_TIME: "-1" From 2d7208ba34d3cd3316027c662079f5bb7509824a Mon Sep 17 00:00:00 2001 From: Klagarge Date: Mon, 26 Feb 2024 09:24:33 +0100 Subject: [PATCH 3/4] update memory --- docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7e9d0d1..be0242a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,8 +9,7 @@ services: - "80:80" - "443:443" volumes: - #- /var/run/docker.sock:/var/run/docker.sock - - "////./pipe/docker_engine:/var/run/docker.sock" + - /var/run/docker.sock:/var/run/docker.sock - ./traefik.yml:/etc/traefik/traefik.yml - ./authorized_users:/etc/traefik/authorized_users - ./acme.json:/acme.json @@ -110,4 +109,6 @@ services: MAX_TICK_TIME: "-1" AUTOPAUSE_TIMEOUT_INIT: "30" AUTOPAUSE_TIMEOUT_EST: "10" + INIT_MEMORY: 128M + MAX_MEMORY: 20G From a7f45c3b0f499d298c09291a28deedf9268ea8e5 Mon Sep 17 00:00:00 2001 From: Klagarge Date: Mon, 26 Feb 2024 11:19:04 +0100 Subject: [PATCH 4/4] add lazytainer --- docker-compose.yml | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index be0242a..102a1f2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -90,25 +90,47 @@ services: - "traefik.http.routers.ollama-webui-https.middlewares=ollama-webui-auth" - "traefik.http.middlewares.ollama-webui-auth.basicauth.usersfile=/etc/traefik/authorized_users" + lazytainer: + image: ghcr.io/vmorganp/lazytainer:master + environment: + VERBOSE: false + ports: + - 25565:25565 + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + labels: + - lazytainer.group.minecraft.sleepMethod=stop + - lazytainer.group.minecraft.ports=25565 + - lazytainer.group.minecraft.minPacketThreshold=2 # Start after two incomming packets + - lazytainer.group.minecraft.inactiveTimeout=60 # 10 minutes, to allow the server to bootstrap. You can probably make this lower later if you want. + restart: unless-stopped + network_mode: bridge + minecraft: image: 'itzg/minecraft-server' restart: unless-stopped stdin_open: true tty: true - ports: - - "25565:25565" volumes: - "./mc:/data" - "./mods:/mods:ro" - + depends_on: + - lazytainer + network_mode: service:lazytainer environment: EULA: "TRUE" TYPE: "FORGE" - ENABLE_AUTOPAUSE: "TRUE" - OVERRIDE_SERVER_PROPERTIES: "TRUE" + + TZ: "Europe/Zurich" MAX_TICK_TIME: "-1" - AUTOPAUSE_TIMEOUT_INIT: "30" - AUTOPAUSE_TIMEOUT_EST: "10" INIT_MEMORY: 128M MAX_MEMORY: 20G + #OVERRIDE_SERVER_PROPERTIES: "TRUE" + #ENABLE_AUTOPAUSE: "TRUE" + #AUTOPAUSE_TIMEOUT_INIT: "30" + #AUTOPAUSE_TIMEOUT_EST: "10" + + + DIFFICULTY: "easy" +