Skip to content

Instantly share code, notes, and snippets.

@bjarneeins
Last active March 6, 2020 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjarneeins/be078d7d74ddeb33741a21a31bb6b78f to your computer and use it in GitHub Desktop.
Save bjarneeins/be078d7d74ddeb33741a21a31bb6b78f to your computer and use it in GitHub Desktop.
Example for running InfluxDB and Grafana with docker-compose
version: '3'
services:
influxdb:
image: influxdb:latest
container_name: influxdb
restart: on-failure
volumes:
- ./data/influxdb/:/var/lib/influxdb
ports:
- "8086:8086"
environment:
INFLUXDB_DB: database
INFLUXDB_HTTP_AUTH_ENABLED: "true"
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: password
INFLUXDB_USER: user
INFLUXDB_USER_PASSWORD: password
grafana:
depends_on:
- influxdb
image: grafana/grafana
container_name: grafana
restart: on-failure
volumes:
- ./data/grafana/grafana_data:/var/lib/grafana
ports:
- "80:3000"
environment:
GF_SERVER_ROOT_URL: https://example.com
GF_SECURITY_ADMIN_PASSWORD: adminpassw0rd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment