Influxdb
InfluxDB is an open source time series database for recording metrics, events, and analytics.
Services
influxdb
influxdb:latest
Ports
8086:8086
/var/lib/influxdb2 : /portainer/Files/AppData/Config/influxdb2
influxdb_cli
influxdb:latest
Volumes
/var/lib/influxdb2 : /portainer/Files/AppData/Config/influxdb2
/etc/ssl/influxdb-selfsigned.crt : /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.crt
/etc/ssl/influxdb-selfsigned.key : /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.key
on-failure:10
Entrypoint
./entrypoint.sh
Env Vars
DOCKER_INFLUXDB_INIT_MODE=setup
DOCKER_INFLUXDB_INIT_USERNAME=myusername
DOCKER_INFLUXDB_INIT_PASSWORD=passwordpasswordpassword
DOCKER_INFLUXDB_INIT_ORG=myorg
DOCKER_INFLUXDB_INIT_BUCKET=mybucket
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=mytoken
INFLUXD_TLS_CERT=/etc/ssl/influxdb-selfsigned.crt
INFLUXD_TLS_KEY=/etc/ssl/influxdb-selfsigned.key
Installation
Via Portainer
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select the app you wish to deploy, fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
Via Docker Run
Service #1 - influxdb
docker run --name influxdb -d \
-p 8086:8086 \
-v /portainer/Files/AppData/Config/influxdb2:/var/lib/influxdb2 \
influxdb:latest
Service #2 - influxdb_cli
docker run --name influxdb_cli -d \
-e "setup" \
-e "myusername" \
-e "passwordpasswordpassword" \
-e "myorg" \
-e "mybucket" \
-e "mytoken" \
-e "/etc/ssl/influxdb-selfsigned.crt" \
-e "/etc/ssl/influxdb-selfsigned.key" \
-v /portainer/Files/AppData/Config/influxdb2:/var/lib/influxdb2 \
-v /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.crt:/etc/ssl/influxdb-selfsigned.crt \
-v /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.key:/etc/ssl/influxdb-selfsigned.key \
--restart=on-failure:10 \
influxdb:latest
Via Docker Compose
Save this file as docker-compose.yml
and run docker-compose up -d
Use this only as a guide.
- name: influxdb
image: influxdb:latest
ports:
- '8086:8086'
volumes:
- bind: /portainer/Files/AppData/Config/influxdb2
container: /var/lib/influxdb2
env: []
- name: influxdb_cli
image: influxdb:latest
entrypoint:
- ./entrypoint.sh
volumes:
- bind: /portainer/Files/AppData/Config/influxdb2
container: /var/lib/influxdb2
- bind: /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.crt
container: /etc/ssl/influxdb-selfsigned.crt
- bind: /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.key
container: /etc/ssl/influxdb-selfsigned.key
restart_policy: on-failure:10
env:
- name: DOCKER_INFLUXDB_INIT_MODE
value: setup
- name: DOCKER_INFLUXDB_INIT_USERNAME
value: myusername
- name: DOCKER_INFLUXDB_INIT_PASSWORD
value: passwordpasswordpassword
- name: DOCKER_INFLUXDB_INIT_ORG
value: myorg
- name: DOCKER_INFLUXDB_INIT_BUCKET
value: mybucket
- name: DOCKER_INFLUXDB_INIT_ADMIN_TOKEN
value: mytoken
- name: INFLUXD_TLS_CERT
value: /etc/ssl/influxdb-selfsigned.crt
- name: INFLUXD_TLS_KEY
value: /etc/ssl/influxdb-selfsigned.key
Alternative Methods
For more installation options, see the Documentation in the GitHub repo
Container Documentation
influxdb Documentation
InfluxDB is the open source time series database built for real-time analytic workloads.
influxdb_cli Documentation
InfluxDB is the open source time series database built for real-time analytic workloads.