Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to use lazymc #2569

Closed
savdbroek opened this issue Jan 1, 2024 · 8 comments
Closed

Option to use lazymc #2569

savdbroek opened this issue Jan 1, 2024 · 8 comments

Comments

@savdbroek
Copy link

Enhancement Type

A completely new feature

Describe the enhancement

It would be great if this docker image could have lazymc as an option.

https://github.com/timvisee/lazymc

@itzg
Copy link
Owner

itzg commented Jan 1, 2024

Conceptually that's a good idea and was also brought up here

#2115 (comment)

It would be difficult to retrofit that into the existing design, but will park it here in case I can think about it more.

@nfroeschl
Copy link
Contributor

nfroeschl commented Jan 16, 2024

I have something similar running with lazy_container.

version: "3"
services:
  lazytainer:
    container_name: 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
      - lazytainer.group.minecraft.inactiveTimeout=600 # 10 minutes, to allow the server to bootstrap. You can probably make this lower later if you want.
    restart: unless-stopped
    network_mode: bridge
  mc:
    image: itzg/minecraft-server
    environment:
      - EULA=TRUE
      - TYPE=PURPUR
      - MEMORY=4G
      - TZ=Europe/Berlin
      - MOTD=From_9_till_22
      - OVERRIDE_SERVER_PROPERTIES=TRUE
    volumes:
      - /opt/container_volumes/minecraft/data:/data
    labels:
      - lazytainer.group=minecraft
    depends_on:
      - lazytainer
    network_mode: service:lazytainer
    tty: true
    stdin_open: true
    restart: unless-stopped
networks: {}

@itzg
Copy link
Owner

itzg commented Jan 16, 2024

@nfroeschl that would be a great section for https://github.com/itzg/docker-minecraft-server/blob/master/docs/misc/examples.md if you want to PR that.

@joesturge
Copy link
Contributor

Hello @savdbroek and @itzg, I know this issue is closed but I have found a way to get lazymc to work with the container, similar to how lazytainer works. Instead of wrapping the server jar in the lazytainer jar, you can pass a custom run command to lazymc, I leveraged this to execute docker start on the minecraft server container. It operated completely seperatly to the minecraft container, in a very similar way to lazytainer. It took a bit of fanageling to work but it works, and quite well.

See it here: https://github.com/joesturge/lazymc-docker-proxy

perhaps, we could ship an image like this to work alongside the itzg container?
Let me know what you think

@itzg
Copy link
Owner

itzg commented Jul 22, 2024

@joesturge very cool. By all means go ahead and get that image going. You can PR a section in the examples along with the lazytainer approach.

@joesturge
Copy link
Contributor

@itzg #3017

@kocane
Copy link

kocane commented Oct 19, 2024

@joesturge thanks a ton for making this, it works great and was exactly what I needed.

@joesturge
Copy link
Contributor

@joesturge thanks a ton for making this, it works great and was exactly what I needed.

Thanks! Glad you like it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants