Using Environment Variables in a Service File

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?

1 Like

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

2 Likes

Awesome this works perfectly.