mesosphere/marathon — pull request #214 by MiLk (2014-04-07 07:36:11+00:00)
Title: Add APP_PORT* environment variables

It allow the tasks to know the port the app should listen on.

Used with `https://github.com/mesosphere/marathon/blob/master/bin/haproxy_cfg` or https://github.com/Wizcorp/frontrunner, the tasks are aware of the port used by the proxy/load balancer.

The `PORTS`, `PORT`, `PORT0`, ... variables contain the ports used by the task, which are backends for the proxy/lb.
The `APP_PORTS`, `APP_PORT`, `APP_PORT0`, ... variables contains the port that the app should use, which is the port used by the proxy/lb.