pelican-dev / wings

MIT License
107 stars 13 forks source link

Docker container labels do not apply. #20

Closed notAreYouScared closed 3 weeks ago

notAreYouScared commented 1 month ago

Docker container labels are present in /api/remote/servers/<uuid>, but Wings does not apply them to the server.

API output from the panel They're listed in two places to see if wings would catch them, and it does not. They should be under the container.

{
  "settings": {
    "uuid": "7e15a01d-0fa7-4019-9367-fac66cbc1be8",
    "meta": {
      "name": "paper",
      "description": ""
    },
    "suspended": true,
    "environment": {
      "MINECRAFT_VERSION": "latest",
      "SERVER_JARFILE": "server.jar",
      "DL_PATH": "",
      "BUILD_NUMBER": "latest",
      "STARTUP": "java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true -jar {{SERVER_JARFILE}}",
      "P_SERVER_UUID": "7e15a01d-0fa7-4019-9367-fac66cbc1be8",
      "P_SERVER_ALLOCATION_LIMIT": 0
    },
    "invocation": "java -Xms128M -XX:MaxRAMPercentage=95.0 -Dterminal.jline=false -Dterminal.ansi=true -jar {{SERVER_JARFILE}}",
    "skip_egg_scripts": false,
    "build": {
      "memory_limit": 0,
      "swap": 0,
      "io_weight": 500,
      "cpu_limit": 0,
      "threads": null,
      "disk_space": 0,
      "oom_killer": true
    },
    "labels": {  // Added to see if wings would catch them, it does not.
      "asdfasds": "fasdfas",
      "asdfasdf": "asdfa",
      "asdfasd": "asdf"
    },
    "container": {
      "image": "ghcr.io/parkervcp/yolks:java_21",
      "requires_rebuild": false,
      "labels": { // Will be the labels home.
        "asdfasds": "fasdfas",
        "asdfasdf": "asdfa",
        "asdfasd": "asdf"
      }
    },
    "allocations": {
      "force_outgoing_ip": false,
      "default": {
        "ip": "0.0.0.0",
        "port": 25566
      },
      "mappings": {
        "0.0.0.0": [
          25566
        ]
      }
    },
    "mounts": [],
    "egg": {
      "id": "1b82fbc5-8f4a-44bc-8f4b-279e67c0dec7",
      "file_denylist": []
    }
  },
  "process_configuration": {
    "startup": {
      "done": [
        ")! For help, type "
      ],
      "user_interaction": [],
      "strip_ansi": false
    },
    "stop": {
      "type": "command",
      "value": "stop"
    },
    "configs": [
      {
        "parser": "properties",
        "file": "server.properties",
        "replace": [
          {
            "match": "server-ip",
            "replace_with": "0.0.0.0"
          },
          {
            "match": "server-port",
            "replace_with": ""
          },
          {
            "match": "query.port",
            "replace_with": ""
          }
        ]
      }
    ]
  }
}
Boy132 commented 3 weeks ago

This was fixed by #23

grafik grafik