This repository is for building multi-container application with :
- InfluxDB_v2 - a time series database
- Grafana - for visualization of data stored in InfluxDB
This repository specifically support InfluxDB 2.x
- docker-compose on the docker host.
- Clone the repository
git clone https://github.com/ansjin/docker-compose-influxdb-v2-grafana.git- Change default credentials stored in
.envfile:
INFLUXDB_USERNAME=admin
INFLUXDB_PASSWORD=secure_influx_admin_password
INFLUXDB_ORG=my_org
INFLUXDB_BUCKET=my_bucket
INFLUXDB_ADMIN_TOKEN=a_secure_admin_token
GRAFANA_USERNAME=admin
GRAFANA_PASSWORD=secure_influx_admin_password- Optionally add dashboards in
./grafana-provisioning/dashboards/. - Run the following command as root
sudo docker-compose up -d --build
Run the following command as root
sudo docker-compose down
Run the following command as root
./run.sh
The Grafana and InfluxDB in the app are exposed on the following host ports:
| Port | Service |
|---|---|
| 3000 | Grafana |
| 8086 | InfluxDB |
Please add issues if you have a question or found a problem.
Pull requests are welcome too!
Contributions are most welcome. Please message me if you like the idea and want to contribute.

