version: '3.6'

services:

  {{ mysql_service_name }}:
    image: {{ mysql_image_name }}
    environment:
      MYSQL_USER: {{ mysql_jdbc_user }}
      MYSQL_PASSWORD: {{ mysql_jdbc_pass }}
      MYSQL_ROOT_PASSWORD: {{ mysql_jdbc_pass }}
      MYSQL_DB: {{ mysql_jdbc_db }}
    networks:
      - {{ conductor_network }}
    deploy:
      replicas: {{ mysql_replicas }}
{% if infrastructure == 'local' %}
      placement:
        constraints: [node.role == worker]
{% endif %}

networks:
   {{ conductor_network }}:
