diff --git a/installer/roles/local_docker/templates/docker-compose.yml.j2 b/installer/roles/local_docker/templates/docker-compose.yml.j2 index cdc6713480..03bb530485 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/