Config.yml file for WEB_SERVER_ADDRESS

From @gitricko on Fri May 04 2018 05:10:04 GMT+0000 (UTC)

Is this not possible to do?

WEB_SERVER_ADDRESS: '0.0.0.0:${PORT:8000}'

now i run this command:
PORT=8080 nameko run --config config.yml trainproxy.service_mocktrainsvr

hoping webserver address will change to 8080… it does not work.

Error: Misconfigured bind address `0.0.0.0:${PORT:8000}`. Should be `[address:]port`


Copied from original issue: https://github.com/nameko/nameko/issues/540

From @mattbennett on Fri May 04 2018 09:27:51 GMT+0000 (UTC)

It’s because you’ve quoted it.

WEB_SERVER_ADDRESS: 0.0.0.0:${PORT:8000}

Will work as you expect.

If you need to quote the value for some reason, you can use the explicit matcher.

WEB_SERVER_ADDRESS: !env_var "0.0.0.0:${PORT:8000}"

Also does what you’d expect.