aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/influx/initdb.sh')
-rwxr-xr-xcontrib/influx/initdb.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/influx/initdb.sh b/contrib/influx/initdb.sh
new file mode 100755
index 0000000..b1d07af
--- /dev/null
+++ b/contrib/influx/initdb.sh
@@ -0,0 +1,16 @@
1#!/bin/bash
2# The following script creates the authentication for Grafana
3# and is meant to be added to InfluxDB docker-compose.yml file.
4# image: influxdb
5# volumes:
6# - "./config/influx:/docker-entrypoint-initdb.d"
7set -e
8
9# Retrieve the ID from the bucket created during setup
10BUCKET_ID=$(influx bucket list | grep "$DOCKER_INFLUXDB_INIT_BUCKET" | awk '{print $1}')
11
12influx v1 auth create \
13 --username ${DOCKER_INFLUXDB_INIT_USERNAME} \
14 --password ${DOCKER_INFLUXDB_INIT_PASSWORD} \
15 --write-bucket ${BUCKET_ID} \
16 --org ${DOCKER_INFLUXDB_INIT_ORG}
Powered by cgit v1.2.3 (git 2.41.0)