Add grafana docker network and restrict port binds
This commit is contained in:
parent
155bc837a8
commit
fe2450d43b
5 changed files with 24 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
||||||
collections:
|
collections:
|
||||||
- ansible.posix
|
- ansible.posix
|
||||||
- community.general
|
- community.general
|
||||||
|
- community.docker
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- src: geerlingguy.docker
|
- src: geerlingguy.docker
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
expose_ssh: true
|
expose_ssh: true
|
||||||
|
|
||||||
|
protected_ip: "{{ pve_hosts.forrest.internal_ip }}"
|
||||||
|
|
|
@ -17,12 +17,14 @@ services:
|
||||||
- GF_SMTP_PASSWORD={{ grafana_smtp_password }}
|
- GF_SMTP_PASSWORD={{ grafana_smtp_password }}
|
||||||
- GF_SMTP_FROM_ADDRESS={{ grafana_from_email }}
|
- GF_SMTP_FROM_ADDRESS={{ grafana_from_email }}
|
||||||
- GF_SMTP_FROM_NAME=grafana
|
- GF_SMTP_FROM_NAME=grafana
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ app_data_dir }}/grafana:/var/lib/grafana"
|
- "{{ app_data_dir }}/grafana:/var/lib/grafana"
|
||||||
|
networks:
|
||||||
|
- default
|
||||||
|
- grafana
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- "{{ protected_ip }}:3000:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- renderer
|
- renderer
|
||||||
|
@ -41,3 +43,8 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- BROWSER_TZ={{ TZ }}
|
- BROWSER_TZ={{ TZ }}
|
||||||
|
|
||||||
|
|
||||||
|
networks:
|
||||||
|
grafana:
|
||||||
|
external: true
|
||||||
|
|
|
@ -8,8 +8,9 @@ services:
|
||||||
- /mnt/tank/dbs/influx/forrest:/var/lib/influxdb
|
- /mnt/tank/dbs/influx/forrest:/var/lib/influxdb
|
||||||
environment:
|
environment:
|
||||||
- INFLUXDB_HTTP_AUTH_ENABLED=true
|
- INFLUXDB_HTTP_AUTH_ENABLED=true
|
||||||
ports:
|
networks:
|
||||||
- 8086:8086
|
- default
|
||||||
|
- grafana
|
||||||
|
|
||||||
chronograf:
|
chronograf:
|
||||||
image: chronograf:1.8-alpine
|
image: chronograf:1.8-alpine
|
||||||
|
@ -21,4 +22,8 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./chronograf:/var/lib/chronograf
|
- ./chronograf:/var/lib/chronograf
|
||||||
ports:
|
ports:
|
||||||
- 8888:8888
|
- "{{ protected_ip }}:8888:8888"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
grafana:
|
||||||
|
external: true
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
- name: Create network
|
||||||
|
docker_network:
|
||||||
|
name: grafana
|
||||||
|
|
||||||
- name: Create grafana install directory
|
- name: Create grafana install directory
|
||||||
file:
|
file:
|
||||||
path: /opt/grafana
|
path: /opt/grafana
|
||||||
|
|
Loading…
Reference in a new issue