version: '3.8'

services:
  zot:
    image: ghcr.io/project-zot/zot:v2.0.1
    container_name: provisioning-oci-registry
    ports:
      - "5000:5000"
    volumes:
      - ./config.json:/etc/zot/config.json:ro
      - zot-data:/var/lib/registry
      - zot-logs:/var/log/zot
      - ./certs:/etc/zot/certs:ro
    restart: unless-stopped
    environment:
      - ZOT_LOG_LEVEL=info
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:5000/v2/"]
      interval: 30s
      timeout: 10s
      retries: 3
    networks:
      - provisioning-net

  # Optional: Zot UI (if not using embedded UI)
  zot-ui:
    image: ghcr.io/project-zot/zot-ui:v2.0.1
    container_name: provisioning-oci-registry-ui
    ports:
      - "3000:3000"
    environment:
      - ZOT_API_URL=http://zot:5000
    depends_on:
      - zot
    networks:
      - provisioning-net

networks:
  provisioning-net:
    driver: bridge

volumes:
  zot-data:
  zot-logs:
