gcgarner / IOTstack

docker stack for getting started on IOT on the Raspberry PI
GNU General Public License v3.0
1.5k stars 578 forks source link

Grafana ignores grafana.env #131

Open Roberto6969 opened 4 years ago

Roberto6969 commented 4 years ago

Hello,

is there any way to diagnose why Grafana ignores every change in grafana.env? When I change parameter in grafana.env and recreate container (docker-compose up -d), I get: nodered is up-to-date portainer is up-to-date influxdb is up-to-date Recreating grafana ... Recreating grafana ... done

OK, it seems recreaction process found out i had made a change to grafana.env. But why Grafana does not take any new parameter (for example new admin password: GF_SECURITY_ADMIN_PASSWORD=whatever)?

Thank You!

Slyke commented 4 years ago

I don't have this problem... But does docker-compose build before running up fix it?

Roberto6969 commented 4 years ago

Do you mean if I run docker-compose build before docker-compose up -d? Yes, but the message is: "grafana uses an image, skipping"

Slyke commented 4 years ago

I had a weird bug with Grafana. It was actually ignoring the env file, but only changes I had made to it after I initially started it up. Try removing the container and image, and starting it again that way. It seems like the container isn't picking up changes to the env file once instantiated.

Roberto6969 commented 4 years ago

From my experience:

  1. check if all the entries in grafana.env has correct syntax (!)
  2. docker-compose up -d is enough to implement changes but if not
  3. @Slyke's solution works if nothing else no