{# Jinja2 template for docker-compose.yml #}
services:
  {{ service_name | default('mock_api_service') }}:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        APP_PORT: {{ business_port | default(8000) }}
    ports:
      - "{{ business_port | default(8000) }}:{{ business_port | default(8000) }}"
      {% if admin_ui_enabled %}
      - "{{ admin_port | default(8001) }}:{{ admin_port | default(8001) }}"
      {% endif %}
    container_name: {{ service_name | default('mock_api_service') }}_{{ timestamp_id }} # Unique name
    environment:
      - LOG_LEVEL=INFO
      - BUSINESS_PORT={{ business_port | default(8000) }}
      {% if admin_ui_enabled %}
      - ADMIN_PORT={{ admin_port | default(8001) }}
      {% endif %}
      # Add any other environment variables needed by the mock server
    # volumes: # Optional: for development with live reload if uvicorn --reload is used
    #   - .:/app
    restart: unless-stopped
