Closed larserhardsen closed 3 years ago
You cannot see them by inspecting the container, as they are injected at runtime:
As they are only exposed to the Grafana process itself, there is no way for you to check it from the outside.
As for setting it to /var/lib/grafana/
... not sure what you try to achieve with that, as that is non-persistent storage. Nothing written in that folder will be stored.
Thank you for your fast response!
I think it’s because the Strava integration might be spawning a separate process, which doesn’t pick up the environment variable. Is there a way to force an environment variable onto the container to achieve a “global” env variable?
Regarding the /var/lib/grafana/ path, this is intentional, as the refresh-token is supposed to be temporary. I did try setting the path to /data/ instead, but I could not make it work, probably due to the environment variable problem. Please disregard this part :)
I think it’s because the Strava integration might be spawning a separate process, which doesn’t pick up the environment variable.
The separate process is spawned by Grafana itself, so it should have access to those same environment variables.
Unfortunately, there no way to set container-level global environment variables in this ecosystem.
Alright, I will open an issue with the Strava datasource. Thank you for your help!
Hi,
I am trying to set up the grafana-strava-datasource on Grafana deployed as an addon (version 6.0.0) on my Home Assistant supervised installation. I have added this section to the addon config:
And in the addin log I see this show up:
[09:48:28] INFO: Setting GF_STRAVA_DS_DATA_PATH to /var/lib/grafana/
The problem is that Strava plugin can't figure out where to store it's refresh token.
I believe that the GF_STRAVA_DS_DATA_PATH variable is not actually set as an environment variable on the system level, I have tested this by running
docker inspect addon_a0d7b954_grafana
and looking in the environment variable list. Also, I tried entering the running container and getting the environment variables list, same problem. However, setting GF_DEFAULT_INSTANCE_NAME seems to work.As a side note, I have tried deploying Grafana directly on a Docker host, supplying the environment variable as an argument to the docker command, and in that case, it works.