Uploaded image for project: 'Marathon'
  1. Marathon
  2. MARATHON-3849

Update Port environment variables to allow lookup by declared port.

    Details

      Description

      Initial motivation from MGI-587 but is probably a larger issue than just docker networking.

      Idea

      When you create your app manifest it would be nice to be able to refer to declared ports by number when starting/configuring your app.

       json
      {...
        "ports": [80, 443, 9990]
      ...}
      

      Then in the env for your app you would contain the following variables:

      PORT_80=32185
      PORT_443=32184
      PORT_9990=32183
      

      Example

       json
      {
        "id": "server",
        "cmd": "java -jar -Dhttp.port=$PORT_80 -Dhttps.port=$PORT_443 -Dadmin.http.port=$PORT_9990 app.jar",
        "cpus": 2,
        "instances": 1,
        "mem": 1280,
        "ports":[80, 443, 9990],
        "uris": [
          "https://server/app.jar"
        ]
      }
      

        Attachments

          Activity

            People

            • Assignee:
              GitHub_ConnorDoyle Connor Doyle (Inactive)
              Reporter:
              benwhitehead Ben Whitehead (Inactive)
              Team:
              Orchestration Team
              Watchers:
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: