services:
  ollama:
    extends:
      file: ${TEMPLATES_PATH}
      service: default
    image: ollama/ollama:0.20.3
    container_name: ollama
    ports:
      - 4019:11434
    networks:
      - ip6net
    volumes:
      - ${SERVICE_PATH}/ollama/data:/root/.ollama
    labels:
      # Traefik
      - "traefik.enable=true"
      - "traefik.http.routers.ollama.rule=Host(`ollama.${PUBLIC_DOMAIN}`)"
      - "traefik.http.routers.ollama.entrypoints=https"
      - "traefik.http.routers.ollama.tls=true"
