docker: allow specifying external networks
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
6956ce1c90
commit
bf373909e7
|
@ -9,6 +9,7 @@ grafana_cont_name: '{{ grafana_service_name }}'
|
|||
grafana_cont_vol: '{{ grafana_service_path }}/data'
|
||||
# see: http://docs.grafana.org/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later
|
||||
grafana_cont_uid: 472
|
||||
grafana_cont_networks: []
|
||||
# Permission adjust for dockremap.
|
||||
grafana_host_uid: '{{ 100000 + grafana_cont_uid | int }}'
|
||||
grafana_cont_port: 9400
|
||||
|
|
|
@ -6,6 +6,9 @@ services:
|
|||
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:
|
||||
|
@ -16,3 +19,11 @@ services:
|
|||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
{% if grafana_cont_networks != [] %}
|
||||
{% for network in grafana_cont_networks %}
|
||||
networks:
|
||||
{{ network }}:
|
||||
external: true
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue