html2rss / html2rss-web

🕸 Create custom RSS feeds from any website with ease! Quick setup with Docker. Use built-in configs or tailor your own. Stay updated effortlessly.
https://html2rss.github.io/components/html2rss-web
MIT License
86 stars 11 forks source link

html2rss-web with traefik: not proxying, container stuck in "starting" #620

Closed mklemme1 closed 9 months ago

mklemme1 commented 9 months ago

Hallo

I am trying to use html2rss-web with Docker and Traefik.

My docker-compose.yml:

version: '3.3'
services:
  html2rss:
    image: gilcreator/html2rss-web
    container_name: html2rss                                                                                                                                                                                                
    volumes:
      - type: bind
        source: ./feeds.yml
        target: /app/config/feeds.yml
        read_only: true
    environment:
      - PORT=80
      - RACK_ENV=production
      - HEALTH_CHECK_USERNAME=health
      - HEALTH_CHECK_PASSWORD=xxx
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.html2rss.entrypoints=http"
      - "traefik.http.routers.html2rss.rule=Host(`html2rss.xxx.de`)"
      - "traefik.http.middlewares.html2rss-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.html2rss.middlewares=html2rss-https-redirect"
      - "traefik.http.routers.html2rss-secure.entrypoints=https"
      - "traefik.http.routers.html2rss-secure.rule=Host(`html2rss.xxx.de`)"
      - "traefik.http.routers.html2rss-secure.tls=true"
      - "traefik.http.routers.html2rss-secure.tls.certresolver=http"
      - "traefik.http.routers.html2rss-secure.service=html2rss"
      - "traefik.http.services.html2rss.loadbalancer.server.port=80"
      - "traefik.docker.network=proxy"
    networks:
      - proxy

networks:
  proxy:
    external: true

In Traefik's log I find

time="2023-12-22T20:29:48+01:00" level=debug msg="Filtering unhealthy or starting container" container=html2rss-html2rss-web-7e3d7a19bf11ae0876fd5848850fa3ddc638c59f11ccbaf8072734db5cbaa012 providerName=docker

Traefik's view is correct:

root# docker ps 
CONTAINER ID   IMAGE                             COMMAND                  CREATED         STATUS                            PORTS                                                                      NAMES
7e3d7a19bf11   gilcreator/html2rss-web           "bundle exec 'puma -…"   7 minutes ago   Up 7 minutes (health: starting)   3000/tcp                                                                   html2rss

How can I change the setup to have html2rss-web signal it is healthy? I can access the container's web interface via the container IP on port 80.

Thanks M

gildesmarais commented 9 months ago

Hey, there was indeed a problem with the healtcheck on the docker side. Should be fixed with the latest changes. Please pull the recent image and the healthcheck should report "healthy".

I consider traefik out of this project's scope … I'm using nginx as reverse proxy and it works just fine :-)

Merry christmas. :)

mklemme1 commented 9 months ago

Hallo Gil Thanks for looking into this. Unfortunately I cannot see an improvement.

# docker compose  pull
[+] Pulling 1/1
 ✔ html2rss Pulled                                                                                                                                                                        0.9s 
# docker compose  down
[+] Running 1/1
 ✔ Container html2rss  Removed                                                                                                                                                            0.4s 
# docker compose  up -d 
[+] Running 1/1
 ✔ Container html2rss  Started                                                                                                                                                            0.0s 
[...]
# docker compose  ps 
NAME       IMAGE                     COMMAND                                  SERVICE    CREATED         STATUS                            PORTS
html2rss   gilcreator/html2rss-web   "bundle exec 'puma -C config/puma.rb'"   html2rss   26 minutes ago   Up 26 minutes (health: starting)   0.0.0.0:3000->3000/tcp, :::3000->3000/tcp
root@server1:~/containers/html2rss-web#