services:
  lobby:
    image: itzg/minecraft-bedrock-server
    container_name: mc-lobby
    environment:
      EULA: "TRUE"
      SERVER_PORT: "19132"
      OP_PERMISSION_LEVEL: "4"
      # Other server.properties-aliased env vars (SERVER_NAME, GAMEMODE, DIFFICULTY,
      # ALLOW_CHEATS, ONLINE_MODE, MAX_PLAYERS, DEFAULT_PLAYER_PERMISSION_LEVEL) are
      # intentionally not set here — they're owned by /data/server.properties inside
      # the named volume and edited via mc-manager's UI. LEVEL_NAME lives in
      # docker-compose.override.yml on the host (managed by mc-manager, gitignored).
    ports:
      - "${LOBBY_PORT:-19132}:19132/udp"
    volumes:
      - lobby-data:/data
      - ./lobby-addon/lobby_transfer_BP:/data/behavior_packs/lobby_transfer_BP
      - ./lobby-addon/lobby_transfer_RP:/data/resource_packs/lobby_transfer_RP
      - ./addon/spark_pet_BP:/data/behavior_packs/spark_pet_BP
      - ./addon/spark_pet_RP:/data/resource_packs/spark_pet_RP
      - ./addon/heyhe_pet_BP:/data/behavior_packs/heyhe_pet_BP
      - ./addon/heyhe_pet_RP:/data/resource_packs/heyhe_pet_RP
      - ./addon/anthrax_cat_BP:/data/behavior_packs/anthrax_cat_BP
      - ./addon/anthrax_cat_RP:/data/resource_packs/anthrax_cat_RP
      - ./monkey-addon/monkey_BP:/data/behavior_packs/monkey_BP
      - ./monkey-addon/monkey_RP:/data/resource_packs/monkey_RP
      - ./private-chest-addon/private_chest_BP:/data/behavior_packs/private_chest_BP
      - ./private-chest-addon/private_chest_RP:/data/resource_packs/private_chest_RP
      - ./home-sign-addon/home_sign_BP:/data/behavior_packs/home_sign_BP
      - ./home-sign-addon/home_sign_RP:/data/resource_packs/home_sign_RP
      - ./keep-inventory-addon/keep_inventory_BP:/data/behavior_packs/keep_inventory_BP
      - ./postal-service-addon/postal_service_BP:/data/behavior_packs/postal_service_BP
      - ./postal-service-addon/postal_service_RP:/data/resource_packs/postal_service_RP
      - ./camping-supplies-addon/camping_supplies_BP:/data/behavior_packs/camping_supplies_BP
      - ./camping-supplies-addon/camping_supplies_RP:/data/resource_packs/camping_supplies_RP
      - ./dynamite-addon/dynamite_BP:/data/behavior_packs/dynamite_BP
      - ./dynamite-addon/dynamite_RP:/data/resource_packs/dynamite_RP
      - ./tow-boat-addon/tow_boat_BP:/data/behavior_packs/tow_boat_BP
      - ./tow-boat-addon/tow_boat_RP:/data/resource_packs/tow_boat_RP
    restart: unless-stopped
    # Cap each Bedrock service so a runaway/hung server can't OOM-kill its
    # neighbours. Host has 8 GB; 4 × 1500 MB leaves headroom for the OS and
    # the supporting stack.
    mem_limit: 1500m
    memswap_limit: 2500m
    networks:
      - mc-network

  jamie:
    image: itzg/minecraft-bedrock-server
    container_name: mc-jamie
    environment:
      EULA: "TRUE"
      SERVER_PORT: "19132"
      OP_PERMISSION_LEVEL: "4"
      # See lobby for rationale. LEVEL_SEED is dropped too — the world has long since
      # been generated and the seed is ignored thereafter.
    ports:
      - "${JAMIE_PORT:-19133}:19132/udp"
    volumes:
      - jamie-data:/data
      - ./hub-return-addon/hub_return_transfer_BP:/data/behavior_packs/hub_return_transfer_BP
      - ./private-chest-addon/private_chest_BP:/data/behavior_packs/private_chest_BP
      - ./private-chest-addon/private_chest_RP:/data/resource_packs/private_chest_RP
      - ./smart-crafting-addon/smart_crafting_BP:/data/behavior_packs/smart_crafting_BP
      - ./smart-crafting-addon/smart_crafting_RP:/data/resource_packs/smart_crafting_RP
      - ./home-sign-addon/home_sign_BP:/data/behavior_packs/home_sign_BP
      - ./home-sign-addon/home_sign_RP:/data/resource_packs/home_sign_RP
      - ./keep-inventory-addon/keep_inventory_BP:/data/behavior_packs/keep_inventory_BP
      - ./postal-service-addon/postal_service_BP:/data/behavior_packs/postal_service_BP
      - ./postal-service-addon/postal_service_RP:/data/resource_packs/postal_service_RP
      - ./camping-supplies-addon/camping_supplies_BP:/data/behavior_packs/camping_supplies_BP
      - ./camping-supplies-addon/camping_supplies_RP:/data/resource_packs/camping_supplies_RP
      - ./dynamite-addon/dynamite_BP:/data/behavior_packs/dynamite_BP
      - ./dynamite-addon/dynamite_RP:/data/resource_packs/dynamite_RP
      - ./tow-boat-addon/tow_boat_BP:/data/behavior_packs/tow_boat_BP
      - ./tow-boat-addon/tow_boat_RP:/data/resource_packs/tow_boat_RP
    restart: unless-stopped
    mem_limit: 1500m
    memswap_limit: 2500m
    networks:
      - mc-network

  lyla:
    image: itzg/minecraft-bedrock-server
    container_name: mc-lyla
    environment:
      EULA: "TRUE"
      SERVER_PORT: "19132"
      OP_PERMISSION_LEVEL: "4"
    ports:
      - "${LYLA_PORT:-19134}:19132/udp"
    volumes:
      - lyla-data:/data
      - ./hub-return-addon/hub_return_transfer_BP:/data/behavior_packs/hub_return_transfer_BP
      - ./addon/spark_pet_BP:/data/behavior_packs/spark_pet_BP
      - ./addon/spark_pet_RP:/data/resource_packs/spark_pet_RP
      - ./addon/heyhe_pet_BP:/data/behavior_packs/heyhe_pet_BP
      - ./addon/heyhe_pet_RP:/data/resource_packs/heyhe_pet_RP
      - ./addon/anthrax_cat_BP:/data/behavior_packs/anthrax_cat_BP
      - ./addon/anthrax_cat_RP:/data/resource_packs/anthrax_cat_RP
      - ./village-evolution-addon/village_evolution_BP:/data/behavior_packs/village_evolution_BP
      - ./private-chest-addon/private_chest_BP:/data/behavior_packs/private_chest_BP
      - ./private-chest-addon/private_chest_RP:/data/resource_packs/private_chest_RP
      - ./smart-crafting-addon/smart_crafting_BP:/data/behavior_packs/smart_crafting_BP
      - ./smart-crafting-addon/smart_crafting_RP:/data/resource_packs/smart_crafting_RP
      - ./home-sign-addon/home_sign_BP:/data/behavior_packs/home_sign_BP
      - ./home-sign-addon/home_sign_RP:/data/resource_packs/home_sign_RP
      - ./keep-inventory-addon/keep_inventory_BP:/data/behavior_packs/keep_inventory_BP
      - ./postal-service-addon/postal_service_BP:/data/behavior_packs/postal_service_BP
      - ./postal-service-addon/postal_service_RP:/data/resource_packs/postal_service_RP
      - ./camping-supplies-addon/camping_supplies_BP:/data/behavior_packs/camping_supplies_BP
      - ./camping-supplies-addon/camping_supplies_RP:/data/resource_packs/camping_supplies_RP
      - ./dynamite-addon/dynamite_BP:/data/behavior_packs/dynamite_BP
      - ./dynamite-addon/dynamite_RP:/data/resource_packs/dynamite_RP
      - ./tow-boat-addon/tow_boat_BP:/data/behavior_packs/tow_boat_BP
      - ./tow-boat-addon/tow_boat_RP:/data/resource_packs/tow_boat_RP
      - ./village-evolution-addon/enabled_packs.json:/data/config/default/enabled_packs.json
    restart: unless-stopped
    mem_limit: 1500m
    memswap_limit: 2500m
    networks:
      - mc-network

  mya:
    image: itzg/minecraft-bedrock-server
    container_name: mc-mya
    environment:
      EULA: "TRUE"
      SERVER_PORT: "19132"
      OP_PERMISSION_LEVEL: "4"
    ports:
      - "${MYA_PORT:-19135}:19132/udp"
    volumes:
      - mya-data:/data
      - ./hub-return-addon/hub_return_transfer_BP:/data/behavior_packs/hub_return_transfer_BP
      - ./addon/spark_pet_BP:/data/behavior_packs/spark_pet_BP
      - ./addon/spark_pet_RP:/data/resource_packs/spark_pet_RP
      - ./addon/heyhe_pet_BP:/data/behavior_packs/heyhe_pet_BP
      - ./addon/heyhe_pet_RP:/data/resource_packs/heyhe_pet_RP
      - ./addon/anthrax_cat_BP:/data/behavior_packs/anthrax_cat_BP
      - ./addon/anthrax_cat_RP:/data/resource_packs/anthrax_cat_RP
      - ./village-evolution-addon/village_evolution_BP:/data/behavior_packs/village_evolution_BP
      - ./private-chest-addon/private_chest_BP:/data/behavior_packs/private_chest_BP
      - ./private-chest-addon/private_chest_RP:/data/resource_packs/private_chest_RP
      - ./smart-crafting-addon/smart_crafting_BP:/data/behavior_packs/smart_crafting_BP
      - ./smart-crafting-addon/smart_crafting_RP:/data/resource_packs/smart_crafting_RP
      - ./home-sign-addon/home_sign_BP:/data/behavior_packs/home_sign_BP
      - ./home-sign-addon/home_sign_RP:/data/resource_packs/home_sign_RP
      - ./keep-inventory-addon/keep_inventory_BP:/data/behavior_packs/keep_inventory_BP
      - ./postal-service-addon/postal_service_BP:/data/behavior_packs/postal_service_BP
      - ./postal-service-addon/postal_service_RP:/data/resource_packs/postal_service_RP
      - ./camping-supplies-addon/camping_supplies_BP:/data/behavior_packs/camping_supplies_BP
      - ./camping-supplies-addon/camping_supplies_RP:/data/resource_packs/camping_supplies_RP
      - ./dynamite-addon/dynamite_BP:/data/behavior_packs/dynamite_BP
      - ./dynamite-addon/dynamite_RP:/data/resource_packs/dynamite_RP
      - ./tow-boat-addon/tow_boat_BP:/data/behavior_packs/tow_boat_BP
      - ./tow-boat-addon/tow_boat_RP:/data/resource_packs/tow_boat_RP
      - ./village-evolution-addon/enabled_packs.json:/data/config/default/enabled_packs.json
    restart: unless-stopped
    mem_limit: 1500m
    memswap_limit: 2500m
    networks:
      - mc-network

volumes:
  lobby-data:
  jamie-data:
  lyla-data:
  mya-data:

networks:
  mc-network:
    driver: bridge
