From 2991ddfc52351898e455b5982a5880e9c0485de9 Mon Sep 17 00:00:00 2001 From: Lennart Melzer Date: Sun, 25 Oct 2020 13:18:37 +0100 Subject: [PATCH] allow labelling docker web container --- .../roles/local_docker/templates/docker-compose.yml.j2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/installer/roles/local_docker/templates/docker-compose.yml.j2 b/installer/roles/local_docker/templates/docker-compose.yml.j2 index cdc671348067..03bb530485d0 100644 --- a/installer/roles/local_docker/templates/docker-compose.yml.j2 +++ b/installer/roles/local_docker/templates/docker-compose.yml.j2 @@ -22,6 +22,16 @@ services: hostname: {{ awx_web_hostname }} user: root restart: unless-stopped + {% if (awx_web_container_labels is defined) and (',' in awx_web_container_labels) %} + {% set awx_web_container_labels_list = awx_web_container_labels.split(',') %} + labels: + {% for awx_web_container_label in awx_web_container_labels_list %} + - {{ awx_web_container_label }} + {% endfor %} + {% elif awx_web_container_labels is defined %} + labels: + - {{ awx_web_container_labels }} + {% endif %} volumes: - supervisor-socket:/var/run/supervisor - rsyslog-socket:/var/run/awx-rsyslog/