Add grafana docker network and restrict port binds

This commit is contained in:
Jake Howard 2021-03-04 14:39:40 +00:00
parent 155bc837a8
commit fe2450d43b
Signed by: jake
GPG key ID: 57AFB45680EDD477
5 changed files with 24 additions and 5 deletions

View file

@ -1,6 +1,7 @@
collections:
- ansible.posix
- community.general
- community.docker
roles:
- src: geerlingguy.docker

View file

@ -1 +1,3 @@
expose_ssh: true
protected_ip: "{{ pve_hosts.forrest.internal_ip }}"

View file

@ -17,12 +17,14 @@ services:
- GF_SMTP_PASSWORD={{ grafana_smtp_password }}
- GF_SMTP_FROM_ADDRESS={{ grafana_from_email }}
- GF_SMTP_FROM_NAME=grafana
volumes:
- "{{ app_data_dir }}/grafana:/var/lib/grafana"
networks:
- default
- grafana
restart: unless-stopped
ports:
- 3000:3000
- "{{ protected_ip }}:3000:3000"
depends_on:
- db
- renderer
@ -41,3 +43,8 @@ services:
restart: unless-stopped
environment:
- BROWSER_TZ={{ TZ }}
networks:
grafana:
external: true

View file

@ -8,8 +8,9 @@ services:
- /mnt/tank/dbs/influx/forrest:/var/lib/influxdb
environment:
- INFLUXDB_HTTP_AUTH_ENABLED=true
ports:
- 8086:8086
networks:
- default
- grafana
chronograf:
image: chronograf:1.8-alpine
@ -21,4 +22,8 @@ services:
volumes:
- ./chronograf:/var/lib/chronograf
ports:
- 8888:8888
- "{{ protected_ip }}:8888:8888"
networks:
grafana:
external: true

View file

@ -1,3 +1,7 @@
- name: Create network
docker_network:
name: grafana
- name: Create grafana install directory
file:
path: /opt/grafana