# Generated by ace_generate_deploy — do not edit manually.
# Regenerate: ace_generate_deploy(target="docker_compose")
# Detected: {{ detected_summary }}
version: "3.9"

services:
  {% for svc in services %}
  {{ svc.name }}:
    {% if svc.image_or_build == "." %}
    build: .
    {% else %}
    image: {{ svc.image_or_build }}
    {% endif %}
    {% if svc.port %}
    ports:
      - "{{ svc.port }}:{{ svc.port }}"
    {% endif %}
    {% if svc.environment %}
    environment:
      {% for env_var in svc.environment %}
      - {{ env_var }}=${{'{'}}{{ env_var }}{{'}'}}
      {% endfor %}
    {% endif %}
    {% if svc.depends_on %}
    depends_on:
      {% for dep in svc.depends_on %}
      - {{ dep }}
      {% endfor %}
    {% endif %}
    {% if svc.health_check %}
    healthcheck:
      test: ["CMD", "curl", "-f", "{{ svc.health_check }}"]
      interval: 30s
      retries: 3
    {% endif %}

  {% endfor %}
