joesturge / lazymc-docker-proxy

Put your Minecraft containers to rest when idle.
GNU General Public License v3.0
27 stars 4 forks source link

Container becomes unhealthy and unusable after shutting down server #149

Closed Starstalker-awe closed 2 weeks ago

Starstalker-awe commented 2 weeks ago

Any time my Minecraft server is stopped automatically (by the proxy), it's status becomes "unhealthy" and I have to manually restart the container.

networks:
  default:
    driver: bridge
    ipam:
      config:
        - subnet: 172.18.0.0/16

services:
  lazymc:
    container_name: lazymc
    image: ghcr.io/joesturge/lazymc-docker-proxy:latest
    networks:
      default:
        ipv4_address: 172.18.0.2
    restart: unless-stopped
    volumes:
      - /home/user/.docker/data/minecraft:/server:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 25565:25565

  minecraft:
    image: itzg/minecraft-server:java21
    mem_limit: 12g
    cpus: 6
    container_name: minecraft
    networks:
      default:
        ipv4_address: 172.18.0.3
    labels:
      - lazymc.enabled=true
      - lazymc.group=minecraft
      - lazymc.server.address=minecraft:25565
      - lazymc.time.sleep_after=300
      - lazymc.public.version=1.20.1
      - lazymc.public.protocol=763
    tty: true
    stdin_open: true
    restart: no
    environment:
      EULA: TRUE
      VERSION: 1.20.1
      TYPE: FABRIC
      MAX_MEMORY: 12G
      SNOOPER_ENABLED: false
      VIEW_DISTANCE: 16
      ONLINE_MODE: false
      PLAYER_IDLE_TIMEOUT: 0
      USE_NATIVE_TRANSPORT: true
      NETWORK_COMPRESSION_THRESHOLD: 1024
      MAX_TICK_TIME: 60000

      MODE: survival
      # World save folder; default 'world'
      # LEVEL: world

      MODRINTH_PROJECTS: | (absolute shitload of mods, none of which affect closing of Minecraft)
    volumes:
      - /home/user/.docker/data/minecraft:/data
joesturge commented 2 weeks ago

Hey can you send the full logs of both laxymc and the mc container please? If you add RUST_LOG: debug to the lazymc container it will print more logs 👍

Starstalker-awe commented 2 weeks ago

...it didn't happen this time... 😟 Logs aren't telling me jack either. 😮‍💨 I'll close the issue and let you know if it shows itself again Sorry for wasting your time, appreciate the extremely useful project