Latest Grafana Docker image with ability to pass InfluxDB datasource info trough envs
4.0K
I was missing option to pass datasources info trough env variables.
I added new file to grafana/grafana:latest which adds new datasource based on data passed trough envs.
# /etc/grafana/provisioning/datasources/automatic.yaml
apiVersion: 1
deleteDatasources:
- name: InfluxDB
orgId: 1
datasources:
- name: InfluxDB
type: influxdb
access: proxy
orgId: 1
url: ${GF_INFLUXDB_URL}
secureJsonData:
token: ${GF_INFLUXDB_TOKEN}
editable: false
isDefault: ${GF_INFLUXDB_IS_DEFAULT}
jsonData:
version: Flux
organization: ${GF_INFLUXDB_ORG}
defaultBucket: ${GF_INFLUXDB_BUCKET}
tlsSkipVerify: ${GF_INFLUXDB_TLS_SKIP_VERIFY}
version: "3.9"
services:
grafana:
image: komelt/grafana:latest
container_name: grafana
ports:
- 3000:3000
environment:
GF_INFLUXDB_URL: "http://influxdb:8086" # deault: http://influxdb:8086
GF_INFLUXDB_TOKEN: "th1515ntr3alt0k3n=="
GF_INFLUXDB_ORG: "testorg"
GF_INFLUXDB_BUCKET: "testbucket" # default: metrics
GF_INFLUXDB_IS_DEFAULT: true # default: true
GF_INFLUXDB_TLS_SKIP_VERIFY: true # default: true
Content type
Image
Digest
sha256:75998ebd3…
Size
113 MB
Last updated
over 2 years ago
docker pull komelt/grafana