Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Support for variables in ports #173

Open
rbarriuso opened this issue Jul 14, 2017 · 0 comments
Open

Support for variables in ports #173

rbarriuso opened this issue Jul 14, 2017 · 0 comments

Comments

@rbarriuso
Copy link

Currently the ports section in the descriptor file only accepts numbers (because of schema validation). Nevertheless the generated Dockerfile accepts env variables when exposing ports, for example: EXPOSE ${KIE_ROUTER_PORT}.

When adding a variable in dogen to the port section the following error is displayed.

2017-07-14 11:49:25,894 dogen        ERROR    <SchemaError: error code 2: Schema validation failed:
 - Value '${KIE_ROUTER_PORT}' is not of type 'int'. Path: '/ports/0/value'.: Path: '/'>

We should evaluate the convenience of supporting env variables as port values.

Moreover, currently many many ports are exposed with a fixed value, though they're configurable via variable. For example, here the default port of Jolokia (8778) is exposed, though it can be configured using the AB_JOLOKIA_PORT variable.
Therefore, if the AB_JOLOKIA_PORT env variable is set to a value other than 8778, the service will listen in that other port but the exposed port to Docker would still be 8778.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant