services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: open-webui
    ports:
      - "3000:8080"
    environment:
      - OPENAI_API_KEY=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
      - WEBUI_SECRET_KEY=top_secret
      - WEBUI_URL=http://localhost:3000/openwebui
    volumes:
      - ./_data:/app/backend/data
    restart: unless-stopped

  pipelines:
    image: ghcr.io/open-webui/pipelines:main
    ports:
      - "9099:9099"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    volumes:
      - pipelines:/app/pipelines
    container_name: pipelines
    restart: unless-stopped

  watchtower:
    image: containrrr/watchtower
    container_name: watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: open-webui
    depends_on:
      - open-webui
    restart: unless-stopped

volumes:
  pipelines:
