Skip to content

Accessing host ip as environment var for production.conf at systemd unite of playframework debian #11438

Answered by mkurz
mahadi-hossain asked this question in Q&A
Discussion options

You must be logged in to vote

First, I in production, there is no build.sbt anymore. You are using sbt-native-packer, so the question is which kind of package do you generate? It's very likely Play will get started through a bash script, probably this one here: https://github.com/sbt/sbt-native-packager/blob/d2fd665a5b3dcd2e4f4b15964a98268bfe4b8235/src/main/resources/com/typesafe/sbt/packager/archetypes/scripts/bash-template#L321-L325
As you can see from the lines I referenced you can pass system variables via -Dkey=val arguments, or also use set JAVA_OPTS.
Maybe also have a look in the sbt-native-packer file , I think there might be options you can set to set up the service file so it passes on the variables to your …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mahadi-hossain
Comment options

@mkurz
Comment options

@mahadi-hossain
Comment options

Answer selected by mahadi-hossain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants