typesafehub / conductr-doc

Other
4 stars 13 forks source link

Not clear that custom endpoints require that http.address is overrided #300

Open tommpy opened 7 years ago

tommpy commented 7 years ago

Trying to get my app working on conductr for the first time I ran in to an annoying-to-track-down problem because I had set:

BundleKeys.endpoints := Map( "payments" -> Endpoint("http", services = Set(URI("http://:9000"))) )

But omitted: javaOptions in Bundle ++= Seq("-Dhttp.address=$PAYMENTS_BIND_IP", "-Dhttp.port=$PAYMENTS_BIND_PORT")

I think this page http://conductr.lightbend.com/docs/1.1.x/BundleConfiguration could do with a big red warning if you use a custom endpoint or something. Even better would be if the wiring was done automagically.

markusjura commented 7 years ago

Also, in http://conductr.lightbend.com/docs/1.1.x/CreatingBundles we say:

Your application or service must be told what interface and port it should bind to when it runs. The Lagom and Play bundle plugins do that automatically.

The above explanation only works if the endpoint name is web and not a custom one. So we should be more descriptive here as well.

huntc commented 7 years ago

Can we have a PR please? Besides which, you shouldn't need to declare these javaOptions for Play or Lagom services as the sbt-conductr plugin will do it for you.