gethomepage / homepage

A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations.

Home Page:https://gethomepage.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] CustomAPI with Docker Service Discovery doesn't work

arhue opened this issue · comments

Description

Specifying customAPI with Docker Service Discovery doesn't work. I am specifically using Docker in Swarm mode. Not confirmed if the same does/does not work in standalone mode.

Related discussion here: #2574

Steps to reproduce

  1. Add labels for widget with Custom API
    Eg.
labels:
      - homepage.group=Downloaders
      - homepage.name=Kapowarr
      - homepage.href=http://kapowarr.loc.com
      - homepage.description=Comics management
      - homepage.widget.type=customapi
      - homepage.widget.url=http://kapowarr.loc.com/api/volumes/stats?api_key=$KAPOWARR_API_KEY
      - homepage.widget.field[0].label=Series
      - homepage.widget.field[0].field.result=volumes
  1. The customAPI widget doesn't show up.

homepage version

v0.8.4 32f28d3

Installation method

Docker

Configuration

labels:
      - homepage.group=Downloaders
      - homepage.name=Kapowarr
      - homepage.href=http://kapowarr.loc.com
      - homepage.description=Comics management
      - homepage.widget.type=customapi
      - homepage.widget.url=http://kapowarr.loc.com/api/volumes/stats?api_key=$KAPOWARR_API_KEY
      - homepage.widget.field[0].label=Series
      - homepage.widget.field[0].field.result=volumes

Container Logs

No response

Browser Logs

No response

Troubleshooting

Nothing relevant in logs

Other

No response

Before submitting, I have made sure to

Specifying customAPI with Docker Service Discovery doesn't work

I dont think thats accurate

      - homepage.widget.type=customapi
      - homepage.widget.url=https://rickandmortyapi.com/api/character/1
      - homepage.widget.mappings[0].field=name
      - homepage.widget.mappings[0].label=Name
      - homepage.widget.mappings[1].field.location=name
      - homepage.widget.mappings[1].label=Location
Screenshot 2024-01-10 at 10 46 24 AM

@shamoon That did not work for me either. Are you using it in Swarm mode or in standalone mode? There are other people in the discussion who have reported the same issue.

Might just be a documentation issue, you're using mappings[] in your label, but the docs say field[].

@aeikenberry Did mappings[] work for you? It did not work for me in Swarm mode.

@arhue Yeah, the block shows up for me with the correct label using that format.

Screenshot 2024-01-10 at 1 25 03 PM

      - homepage.widget.type=customapi
      - homepage.widget.url=http://kapowarr.loc.com/api/volumes/stats?api_key=$KAPOWARR_API_KEY
      - homepage.widget.mappings[0].field.result=volumes
      - homepage.widget.mappings[0].label=Volumes
      - homepage.widget.mappings[1].field.result=issues
      - homepage.widget.mappings[1].label=Issues
      - homepage.widget.mappings[2].field.result=files
      - homepage.widget.mappings[2].label=Files

Works for me, thanks!

EDIT: Looks like the docs are updated, thanks!

Nvm, got it to work with mappings as well. Thanks everyone, sorry about the confusion.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns.