diff options
author | clarkzjw <[email protected]> | 2023-02-24 00:51:04 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-02-24 00:51:04 -0800 |
commit | 4bb5cbdc16ecf5f6e5961373816d4c741d54ee51 (patch) | |
tree | ea85f216881bacb54f579cae9814e2f85aa1abe5 /contrib/influx/initdb.sh | |
parent | a9fb6f252553ae49a2ba372434073824babe31e4 (diff) | |
parent | 391abe42adf3bf065d9543ada068b696b00efdcd (diff) | |
download | swarm2fediverse-4bb5cbdc16ecf5f6e5961373816d4c741d54ee51.tar.gz |
Merge branch 'deploy/cicd'
added Dockerfile and docker-compose.yaml with krakend api gateway and
monitoring using influxdb and grafana dashboard
Diffstat (limited to 'contrib/influx/initdb.sh')
-rwxr-xr-x | contrib/influx/initdb.sh | 16 |
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" | ||
7 | set -e | ||
8 | |||
9 | # Retrieve the ID from the bucket created during setup | ||
10 | BUCKET_ID=$(influx bucket list | grep "$DOCKER_INFLUXDB_INIT_BUCKET" | awk '{print $1}') | ||
11 | |||
12 | influx 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} | ||