CloudFoundry application opening two ports

前端 未结 4 1836
攒了一身酷
攒了一身酷 2021-01-18 10:45

I have a CF application that opens two ports. AFAIK CF can create routing on only for one of them - to the one that is located in VCAP_APP_PORT or PORT

4条回答
  •  时光取名叫无心
    2021-01-18 11:10

    Resurrecting an old question, but this is supported in Cloud Foundry now. Support was added around April 2019. Check your version to see if it supports this.

    The general process is:

    • Use cf cli to update your app to list all the ports it listens on
    • Update each route to the app with the specific port that the route should use. If you have two ports, you'll need two or more routes one port per route.
    • Restart the app

    Right now you have to use cf curl to manually update these records. Instructions can be found here: https://docs.cloudfoundry.org/devguide/custom-ports.html. Hopefully future cf cli versions make this easier.

提交回复
热议问题