Add Grafana and Influx

This commit is contained in:
stebifan 2018-04-10 17:06:00 +02:00
parent ccf16b464e
commit 7fbf99bf14
2 changed files with 64 additions and 1 deletions

View File

@ -10,6 +10,7 @@ services:
io.rancher.container.hostname_override: container_name
io.rancher.container.start_once: true
tty: true
nginx:
image: nginx
volumes:
@ -21,6 +22,33 @@ services:
io.rancher.container.hostname_override: container_name
service: https
grafana:
image: grafana/grafana
environment:
GF_SERVER_ROOT_URL: https://${GRAFANA_DOMAIN}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD}
volumes:
- grafana:/var/lib/grafana
links:
- influxdb:influxdb
labels:
io.rancher.container.pull_image: always
service: 3000
influxdb:
image: tutum/influxdb
volumes:
- influxdb:/data
environment:
PRE_CREATE_DB: freifunk
ADMIN_USER: freifunk
INFLUXDB_INIT_PWD: ${INFLUXDB_PASSWORD}
ports:
- ${INFLUX_8083}:8083
- ${INFLUX_8086}:8086
labels:
io.rancher.container.hostname_override: container_name
letsencrypt:
image: janeczku/rancher-letsencrypt:v0.5.0
environment:

View File

@ -11,6 +11,29 @@ catalog:
label: Domain
required: true
type: string
- variable: GRAFANA_DOMAIN
default: your-domain.de
label: Domain
required: true
type: string
- variable: GRAFANA_PASSWORD
label: Grafana Password
required: true
type: password
- variable: INFLUXDB_PASSWORD
label: Influxdb Password
required: true
type: password
- variable: INFLUX_8083
default: 8083
label: Influx Port 8083
required: true
type: string
- variable: INFLUX_8086
default: 8086
label: Influx Port 8086
required: true
type: string
services:
@ -26,6 +49,18 @@ services:
- target_port: 80
hostname: ${DOMAIN}
grafana:
scale: 1
start_on_create: true
lb_config:
port_rules:
- target_port: 3000
hostname: ${GRAFANA_DOMAIN}
influxdb:
scale: 1
start_on_create: true
letsencrypt:
scale: 1
start_on_create: true