Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.
This repository was archived by the owner on May 5, 2021. It is now read-only.

[Feature] Support configuration with environment variables #146

Description

@forzagreen

It would be nice if wizzy can load json files containing environment variables. This is useful for conf/wizzy.json and datasources.
The conf/wizzy.json file would look like:

{
  "config": {
    "grafana": {
      "url": "https://mygrafana.example.com",
      "username": "${ADMIN_USERNAME}",
      "password": "${ADMIN_PASSWORD}"
    }
  }
}

Example of a datasource datasources/my-influxdb.json:

{
  "orgId": 1,
  "name": "my-influxdb",
  "type": "influxdb",
  "url": "http://localhost:8086",
  "user": "${DB_USER}",
  "password": "${DB_PASSWORD}",
  "database": "${DB_NAME}"
}

It can achieved e.g. with Mustache.js.

FYI, Grafana support using environment variables in its config file: cf. https://grafana.com/docs/installation/configuration/#using-environment-variables

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions