forked from INTO-CPS-Association/DTaaS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinflux.sh
executable file
·30 lines (25 loc) · 856 Bytes
/
influx.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
printf "InfluxDB provision script"
#-------------
printf "\n\n start the InfluxDB server"
printf ".........................."
# note: InfluxDB doesn't work on /vagrant shared folder
INFLUXDB_DATA="${PWD}/data/influxdb2"
mkdir -p "$INFLUXDB_DATA"
# Remember to change the settings
# src: https://hub.docker.com/_/influxdb/
docker run -d -p 80:8086 \
--name influxdb24 \
-v "$INFLUXDB_DATA/data":/var/lib/influxdb2 \
-v "$INFLUXDB_DATA/config":/etc/influxdb2 \
-e DOCKER_INFLUXDB_INIT_MODE=setup \
-e DOCKER_INFLUXDB_INIT_USERNAME=dtaas \
-e DOCKER_INFLUXDB_INIT_PASSWORD=dtaas1357 \
-e DOCKER_INFLUXDB_INIT_ORG=dtaas \
-e DOCKER_INFLUXDB_INIT_BUCKET=dtaas \
influxdb:2.4
#docker run -d -p 9086:8086 \
# --name influx24 \
# -v ${PWD}/data/influxdb2:/var/lib/influxdb2 \
# influxdb:2.4
#printf "Complete the setup from GUI"