You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 24, 2022. It is now read-only.
I have code like the following in my web service's build.sbt, so I can define the port in one place:
containerPort :=8087// For jetty:start
dockerPorts += containerPort.value // For dockerRun
envVars += ("PORT"-> containerPort.value.toString) // For run
Later, in code, I have:
sys.env.get("PORT").map(_.toInt).getOrElse(8080)
And finally, I need a duplicate directive in the Dockerfile to ensure the service binds itself to the correct port when running in a container:
ENV PORT 8087
I'd very much like envVars to get picked up by the docker plugin, similarly to javaOptions. This would allow me to avoid the duplication in our Dockerfile.
The text was updated successfully, but these errors were encountered:
This works with environment variable names that don't use punctuation; double-quotes and other items
may cause errors. Please stick to [A-Za-z_].
Fixesallenai#281 .
This works with environment variable names that don't use punctuation; double-quotes and other items
may cause errors. Please stick to [A-Za-z_].
Fixes#281 .
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have code like the following in my web service's
build.sbt
, so I can define the port in one place:Later, in code, I have:
And finally, I need a duplicate directive in the Dockerfile to ensure the service binds itself to the correct port when running in a container:
ENV PORT 8087
I'd very much like
envVars
to get picked up by the docker plugin, similarly tojavaOptions
. This would allow me to avoid the duplication in our Dockerfile.The text was updated successfully, but these errors were encountered: