Using Environment Variables in a Service File

systemd

#1

I have a systemd service that runs a python script which requires an environment variable that I have defined through resin. When I run the script from the command line, it runs absolutely fine. Yet when run through a service, the script fails. From what I have read systemd services are not able to access environment variables, is there a way around this?


#3

:speech_balloon:You can read the env vars from /etc/docker.env


#4

Awesome this works perfectly.