Created
May 21, 2018 19:50
-
-
Save jceloria/75abd3d63f815fe39c55044ff8bb4b7f to your computer and use it in GitHub Desktop.
influxdb in Docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=influxdb in Docker container | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
TimeoutStartSec=0 | |
Restart=always | |
ExecStartPre=-/usr/bin/docker stop influxdb | |
ExecStartPre=-/usr/bin/docker rm influxdb | |
ExecStartPre=-/usr/bin/docker pull docker.io/influxdb:alpine | |
ExecStart=/usr/bin/docker run --rm -t \ | |
-v /opt/data/influxdb/config/influxdb.conf:/etc/influxdb/influxdb.conf:ro \ | |
-v /opt/data/influxdb/storage:/var/lib/influxdb \ | |
-p 8083:8083 \ | |
-p 8086:8086 \ | |
--name influxdb docker.io/influxdb:alpine | |
ExecStop=-/usr/bin/docker stop -t 3 influxdb | |
ExecStop=-/usr/bin/docker rm influxdb | |
Restart=always | |
RestartSec=10s | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cool