🐛 Bug Report: Pocket-id is not discovered as a container by traefik using labels - probably healthcheck related #293

Closed
opened 2025-10-08 00:01:53 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ArthurHuyghe on GitHub.

Reproduction steps

I followed the installation instructions from the documentation, copied compose.yml and .env and changed the necessary variables. Pocket-id did not install successfully, so I searched through the discussions and issues on github and on the internet for solutions, but did not found any that worked.

Expected behavior

The docker container should be detected by treafik and pocket-id should be able to be setup .

Actual Behavior

The container starts up, the logs show no errors, but it isn't picked up by treafik. I manually added pocket-id to treafiks static config-file, and now when I surf to pocket-id, I get an error stating something critical went wrong and Failed to get application configuration: connect ECONNREFUSED 127.0.0.1:8080 appears in the logs. After a while the healtcheck fails aswell. When I curl pocket-id:8080 from another container, it returns HTTP/1.1 404 Not Found.

Version and Environment

Version information:

Pocket-Id: v0.40.0
Traefik: v3.3.2
Docker: v24.0.2

Compose-file:

---
networks:
 proxy_network:
  external: true

services:
  pocket-id:
    image: ghcr.io/pocket-id/pocket-id:v0.40.0
    container_name: pocket-id
    restart: unless-stopped
    env_file: .env
    #ports:
    #  - 3000:80 # not needed since we are using traefik 
    volumes:
      - "./data:/app/backend/data"
    # Optional healthcheck  
    healthcheck:
      test: "curl -f http://localhost/health"
      interval: 1m30s
      timeout: 5s
      retries: 2
      start_period: 10s
    
    networks:
      proxy_network:
    # traefik
    labels:
      - traefik.enable=true
      - traefik.http.routers.pocket-id-backend-router.entrypoints=websecure
      - traefik.http.routers.pocket-id-backend-router.rule=Host(`pocket-id.SECRET`) && (PathPrefix(`/api/`) || PathPrefix(`/.well-known/`))
      - traefik.http.routers.pocket-id-backend-router.tls=true
      - traefik.http.routers.pocket-id-backend-router.service=pocket-id-backend-service
      - traefik.http.services.pocket-id-backend-service.loadbalancer.server.port=8080
      - traefik.http.routers.pocket-id-frontend-router.entrypoints=websecure
      - traefik.http.routers.pocket-id-frontend-router.rule=Host(`pocket-id.SECRET`)
      - traefik.http.routers.pocket-id-frontend-router.tls=true
      - traefik.http.routers.pocket-id-frontend-router.service=pocket-id-frontend-service
      - traefik.http.services.pocket-id-frontend-service.loadbalancer.server.port=3000

.env-file:

# See the README for more information: https://github.com/pocket-id/pocket-id?tab=readme-ov-file#environment-variables
PUBLIC_APP_URL=https://pocket-id.SECRET
MAXMIND_LICENSE_KEY=
PUID=1033
PGID=65537
TZ="Europe/Brussels"

# traefik
CADDY_DISABLED=true
TRUST_PROXY=true
HOST='pocket-id'

traefiks config.yml:

tls:
  options:
    modern:
      minVersion: VersionTLS13

http:
  routers:
    
    #test:
    pocket-id-backend-router:
      entryPoints:
        - websecure
      rule: "Host(`pocket-id.SECRET`) && (PathPrefix(`/api/`) || PathPrefix(`/.well-known/`))"
      service: pocket-id-backend-service
      tls: true

    pocket-id-frontend-router:
      entryPoints:
        - websecure
      rule: "Host(`pocket-id.SECRET`)"
      service: pocket-id-frontend-service
      tls: true

services:
    #test:
    pocket-id-backend-service:
      loadBalancer:
        servers:
          - url: http://pocket-id:8080
    pocket-id-frontend-service:
      loadBalancer:
        servers:
          - url: http://pocket-id:3000

Log Output

Image

I couldn't find any other log-files.

Originally created by @ArthurHuyghe on GitHub. ### Reproduction steps I followed the installation instructions from the documentation, copied compose.yml and .env and changed the necessary variables. Pocket-id did not install successfully, so I searched through the discussions and issues on github and on the internet for solutions, but did not found any that worked. ### Expected behavior The docker container should be detected by treafik and pocket-id should be able to be setup . ### Actual Behavior The container starts up, the logs show no errors, but it isn't picked up by treafik. I manually added pocket-id to treafiks static config-file, and now when I surf to pocket-id, I get an error stating something critical went wrong and `Failed to get application configuration: connect ECONNREFUSED 127.0.0.1:8080` appears in the logs. After a while the healtcheck fails aswell. When I curl `pocket-id:8080` from another container, it returns `HTTP/1.1 404 Not Found`. ### Version and Environment Version information: ``` Pocket-Id: v0.40.0 Traefik: v3.3.2 Docker: v24.0.2 ``` Compose-file: ``` yaml --- networks: proxy_network: external: true services: pocket-id: image: ghcr.io/pocket-id/pocket-id:v0.40.0 container_name: pocket-id restart: unless-stopped env_file: .env #ports: # - 3000:80 # not needed since we are using traefik volumes: - "./data:/app/backend/data" # Optional healthcheck healthcheck: test: "curl -f http://localhost/health" interval: 1m30s timeout: 5s retries: 2 start_period: 10s networks: proxy_network: # traefik labels: - traefik.enable=true - traefik.http.routers.pocket-id-backend-router.entrypoints=websecure - traefik.http.routers.pocket-id-backend-router.rule=Host(`pocket-id.SECRET`) && (PathPrefix(`/api/`) || PathPrefix(`/.well-known/`)) - traefik.http.routers.pocket-id-backend-router.tls=true - traefik.http.routers.pocket-id-backend-router.service=pocket-id-backend-service - traefik.http.services.pocket-id-backend-service.loadbalancer.server.port=8080 - traefik.http.routers.pocket-id-frontend-router.entrypoints=websecure - traefik.http.routers.pocket-id-frontend-router.rule=Host(`pocket-id.SECRET`) - traefik.http.routers.pocket-id-frontend-router.tls=true - traefik.http.routers.pocket-id-frontend-router.service=pocket-id-frontend-service - traefik.http.services.pocket-id-frontend-service.loadbalancer.server.port=3000 ``` .env-file: ```yaml # See the README for more information: https://github.com/pocket-id/pocket-id?tab=readme-ov-file#environment-variables PUBLIC_APP_URL=https://pocket-id.SECRET MAXMIND_LICENSE_KEY= PUID=1033 PGID=65537 TZ="Europe/Brussels" # traefik CADDY_DISABLED=true TRUST_PROXY=true HOST='pocket-id' ``` traefiks config.yml: ```yaml tls: options: modern: minVersion: VersionTLS13 http: routers: #test: pocket-id-backend-router: entryPoints: - websecure rule: "Host(`pocket-id.SECRET`) && (PathPrefix(`/api/`) || PathPrefix(`/.well-known/`))" service: pocket-id-backend-service tls: true pocket-id-frontend-router: entryPoints: - websecure rule: "Host(`pocket-id.SECRET`)" service: pocket-id-frontend-service tls: true services: #test: pocket-id-backend-service: loadBalancer: servers: - url: http://pocket-id:8080 pocket-id-frontend-service: loadBalancer: servers: - url: http://pocket-id:3000 ``` ### Log Output ![Image](https://github.com/user-attachments/assets/ad30040e-a685-4d5f-9bbd-7549e0006921) I couldn't find any other log-files.
OVERLORD added the bug label 2025-10-08 00:01:53 +03:00
Author
Owner

@stonith404 commented on GitHub:

I'm converting this to a discussion as this is configuration related and probably not a bug of Pocket ID.

@stonith404 commented on GitHub: I'm converting this to a discussion as this is configuration related and probably not a bug of Pocket ID.
Author
Owner

@ArthurHuyghe commented on GitHub:

I believe I found the solution, while debugging why the container didn't show up for traefik using labels, I changed the HOST -variable. When I changed it back to 0.0.0.0 I could acces pocket-id and start setting it up.

However, the pocket-id container still isn't discovered by traefik using the labels in the compose.yml, even though other containers are being discovered with the same labels.
The healthchecks still break after a few minutes, I believe this is because the healtcheck url is incorrect. Where should I point the healthchecks to?

I believe these two things are related and my hypothesis for why traefik doen't show pocket-id is because the healtchecks report it as unhealthy and therefor traefik doesn't want to serve it.

@ArthurHuyghe commented on GitHub: I believe I found the solution, while debugging why the container didn't show up for traefik using labels, I changed the `HOST` -variable. When I changed it back to `0.0.0.0` I could acces pocket-id and start setting it up. However, the pocket-id container still isn't discovered by traefik using the labels in the compose.yml, even though other containers are being discovered with the same labels. The healthchecks still break after a few minutes, I believe this is because the healtcheck url is incorrect. Where should I point the healthchecks to? I believe these two things are related and my hypothesis for why traefik doen't show pocket-id is because the healtchecks report it as unhealthy and therefor traefik doesn't want to serve it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#293