Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request grafana#41 from NorthIsUp/master
Browse files Browse the repository at this point in the history
Allow for installation of plugins
  • Loading branch information
bergquist committed May 27, 2016
2 parents 52f4fe6 + d9e5b5b commit 1c57578
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ docker run \
grafana/grafana
```

## Installing plugins for Grafana 3

Pass the plugins you want installed to docker with the `GF_INSTALL_PLUGINS` environment variable as a comma seperated list. This will pass each plugin name to `grafana-cli plugins install ${plugin}`.

```
docker run \
-d \
-p 3000:3000 \
--name=grafana \
-e "GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource" \
grafana/grafana
```

## Running specific version of Grafana

```
Expand Down
9 changes: 9 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ if [ ! -z ${GF_AWS_PROFILES+x} ]; then
chmod 600 ~grafana/.aws/credentials
fi

if [ ! -z ${GF_INSTALL_PLUGINS} ]; then
OLDIFS=$IFS
IFS=','
for plugin in ${GF_INSTALL_PLUGINS}; do
grafana-cli plugins install ${plugin}
done
IFS=$OLDIFS
fi

exec gosu grafana /usr/sbin/grafana-server \
--homepath=/usr/share/grafana \
--config=/etc/grafana/grafana.ini \
Expand Down

0 comments on commit 1c57578

Please sign in to comment.