itzg / docker-mc-backup

Provides a side-car container to backup itzg/minecraft-server world data
https://hub.docker.com/r/itzg/mc-backup
MIT License
295 stars 51 forks source link

Restore backup container leaves zombie process #184

Open yorkeJohn opened 1 month ago

yorkeJohn commented 1 month ago

After implementing with docker compose as specified in the documentation, a zombie process is always left behind after running docker compose up -d. I believe this to be caused by the restore-backup service that immediately exits.

Here is my compose.yml:

services:
  # TerraFirmaCraft server
  mc:
    image: itzg/minecraft-server
    ports:
      - "25565:25565"
    environment:
      UID: 1002
      MEMORY: 6G
      EULA: "TRUE"

      # server settings
      LEVEL_TYPE: tfc:overworld
      SPAWN_PROTECTION: 0
      ICON: /icon.png
      DIFFICULTY: normal
      MAX_PLAYERS: 5
      ENABLE_WHITELIST: true

      # mod settings
      MOD_PLATFORM: AUTO_CURSEFORGE
      CF_API_KEY: ${CF_API_KEY}
      CF_SLUG: "terrafirmacraft-worlds-apart"
      CF_FORCE_SYNCHRONIZE: true

    depends_on:
      restore-backup:
        condition: service_completed_successfully
    volumes:
      - ./server-data/tfc/data:/data
      - ./server-data/tfc/icon.png:/icon.png:ro
      - ./server-data/tfc/datapacks:/datapacks:ro
  # Backup restore service
  restore-backup:
    image: itzg/mc-backup
    restart: "no"
    entrypoint: restore-tar-backup
    volumes:
      - ./server-data/tfc/data:/data
      - ./server-data/tfc/backups:/backups:ro
  # Backup service
  backups:
    image: itzg/mc-backup
    depends_on:
      mc:
        condition: service_healthy
    environment:
      BACKUP_INTERVAL: "8h"
      RCON_HOST: mc
      INITIAL_DELAY: 0
    volumes:
      - ./server-data/tfc/data:/data:ro
      - ./server-data/tfc/backups:/backups
itzg commented 1 month ago

Strange. If it's leaving it as a zombie process then that seems like it will be a docker bug.