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

Viewed 42

I have a playframework application what I run as debian file generated by sbt-native-packager. In the production.conf file I need to access HOST_IP as environment variable.

But at systemd (when I run sudo systemctl start app.service) app can't access export HOST_IP=$(hostname -I | awk '{print $1}') env variable.

Is there any way that I can pass environment variable to my debian app production.conf which is run by systemctl ?

0 Answers
Related