Installing this Repository

To get started with this Docker Compose configuration in this repository we need to give it a home on the server. I just clone this repo somewhere on the server and run sudo docker-compose up -d. Docker will auto-start the containers on boot afterwards (based on the restart: always setting in the yaml file).

Since I installed docker-compose using curl instead of dnf into /usr/local I needed to update my sudoers file since it doesn’t include that directory in the PATH environment variable. I fixed that with:

  1. sudo visudo
  2. Append :/usr/local/bin:/usr/local/sbin to the Defaults secure_path line.

Clone

Clone this repo locally (or fork it and clone that repo) to your Docker host (I put mine in /opt/influxdb). Also prepare your secrets by creating empty files with the right permissions:

sudo mkdir /opt/influxdb; cd $_
sudo git clone https://github.com/Robpol86/influxdb.git .
sudo mkdir -m0750 .secrets
for f in cronitor grafana.ini nmc; do
    sudo touch .secrets/$f; sudo chmod 0600 $_
done

Next you’ll want to glance over the various configuration files in this repo. They work for me but you may have a different setup. Start with docker-compose.yml and look at other configuration files in this repository.

Start Containers

Once everything in docker-compose.yml looks good go ahead and start the containers:

cd /opt/influxdb; sudo docker-compose up -d
sudo firewall-cmd --permanent --add-port=8086/tcp
sudo firewall-cmd --permanent --add-port=3000/tcp
sudo systemctl restart firewalld.service

Verify everything works by running sudo docker ps. You should see “influxdb” and “grafana” in the NAMES column.