Do not enable tls if not in swarm mode.

This commit is contained in:
Andrea Dell'Amico 2020-10-15 14:28:01 +02:00
parent 77c4c59ff1
commit ced31ea97b
1 changed files with 2 additions and 0 deletions

View File

@ -2,6 +2,7 @@
{% if docker_log_to_journal %} {% if docker_log_to_journal %}
"log-driver": "journald", "log-driver": "journald",
{% endif %} {% endif %}
{% if docker_swarm %}
{% if docker_tls_api %} {% if docker_tls_api %}
"tls": true, "tls": true,
"tlscacert": "{{ docker_tls_ca }}", "tlscacert": "{{ docker_tls_ca }}",
@ -13,6 +14,7 @@
"tlsverify": false, "tlsverify": false,
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %}
{% if docker_prometheus_metrics %} {% if docker_prometheus_metrics %}
"metrics-addr" : "{{ docker_prometheus_host }}:9323", "metrics-addr" : "{{ docker_prometheus_host }}:9323",
"experimental" : true, "experimental" : true,