philhawthorne / docker-influxdb-grafana

A Docker container which runs InfluxDB and Grafana ready for persisting data
MIT License
181 stars 112 forks source link

how to edit grafana.ini?thx. #61

Open aoquant opened 2 years ago

aoquant commented 2 years ago

how to edit grafana.ini?thx.

cdrnet commented 1 year ago

I'd be interested in that as well, e.g. to make the sessions last a bit longer (currently I have to sign in multiple times per day which gets annoying).

I suspect we'd have to map out additional paths. It looks like the file is in /etc/grafana/grafana.ini?

ronaldn1969 commented 1 year ago

You can edit the grafana.ini before you build the docker container. or as cdrnet suggested to map an addition path to your modified ini. but if you didn't change it so often, you can do it in before...

here are some modifications I did...

[auth]
# Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false
disable_login_form = true    (line 182)

[auth.anonymous]
# enable anonymous access
enabled = true     (line 186)

# specify role for unauthenticated users
org_role = Admin     (line 192)

[server]
# Protocol (http or https)
protocol = https     (line 30)

# The http port  to use
http_port = 3003     (line 36)

# The full public facing url you use in browser, used for redirects and emails
# If you use reverse proxy and sub path specify full url (with sub path)
root_url = https://localhost:3003/     (line 47)

# https certs & key file
cert_file = /var/lib/grafana/MyClientCert-pub.crt     (line 59)
cert_key = /var/lib/grafana/MyClientCert-priv.key