forked from dokku/dokku-graphite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
24 lines (22 loc) · 884 Bytes
/
config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
export GRAPHITE_IMAGE=${GRAPHITE_IMAGE:="dokkupaas/docker-grafana-graphite"}
export GRAPHITE_IMAGE_VERSION=${GRAPHITE_IMAGE_VERSION:="3.0.1"}
export GRAPHITE_ROOT=${GRAPHITE_ROOT:="/var/lib/dokku/services/grafana-graphite-statsd"}
export PLUGIN_COMMAND_PREFIX="graphite"
export PLUGIN_DATA_ROOT=$GRAPHITE_ROOT
export PLUGIN_DATASTORE_PORTS=(8125 8126 80 2003)
export PLUGIN_DATASTORE_WAIT_PORT=80
export PLUGIN_DEFAULT_ALIAS="STATSD"
export PLUGIN_ALT_ALIAS="DOKKU_STATSD"
export PLUGIN_IMAGE=$GRAPHITE_IMAGE
export PLUGIN_IMAGE_VERSION=$GRAPHITE_IMAGE_VERSION
export PLUGIN_SCHEME="statsd"
export PLUGIN_SERVICE="Graphite"
export PLUGIN_VARIABLE="STATSD"
export PLUGIN_BASE_PATH="$PLUGIN_PATH"
if [[ -n $DOKKU_API_VERSION ]]; then
export PLUGIN_BASE_PATH="$PLUGIN_ENABLED_PATH"
fi
if [[ -d "$PLUGIN_DATA_ROOT/*" ]]; then
rm -rf "${PLUGIN_DATA_ROOT:?}/*"
fi