30 lines
812 B
Django/Jinja
30 lines
812 B
Django/Jinja
---
|
|
services:
|
|
app:
|
|
container_name: '{{ grafana_cont_name }}'
|
|
image: '{{ grafana_image }}'
|
|
restart: always
|
|
environment:
|
|
GF_INSTALL_PLUGINS: '{{ grafana_plugins | join(",") }}'
|
|
{% if grafana_cont_networks != [] %}
|
|
networks: {{ grafana_cont_networks | to_json }}
|
|
{% endif %}
|
|
ports:
|
|
- '127.0.0.1:{{ grafana_cont_port }}:{{ grafana_cont_port }}'
|
|
volumes:
|
|
- '{{ grafana_cont_vol }}/lib:/var/lib/grafana'
|
|
- '{{ grafana_cont_vol }}/etc:/etc/grafana'
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:{{ grafana_cont_port }}/api/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
{% if grafana_cont_networks != [] %}
|
|
{% for network in grafana_cont_networks %}
|
|
networks:
|
|
{{ network }}:
|
|
external: true
|
|
{% endfor %}
|
|
{% endif %}
|