runtipi / cli

The command line interface to configure and interact with Runtipi
https://runtipi.io/
GNU General Public License v3.0
4 stars 3 forks source link

Apps using dynamic compose are unreachable if started from CLI (traefik disabled) #58

Open Lancelot-Enguerrand opened 3 weeks ago

Lancelot-Enguerrand commented 3 weeks ago

What is the problem

Traefik is always disabled on apps started from runtipi-cli if they use dynamic compose. This makes these apps unreachable and by extension unusable, you have to restart them from WebUI.

How to reproduce

  1. Choose any app using dynamic compose.
  2. Stop the app if started. (from WebUI or CLI)
  3. Start the app from CLI

You can try with Glance which is very lightweight

What it looks like

As I understand, dynamic compose regenerate docker-compose.yml when apps are started or stopped. It basically add all network config, most part being traefik labels.

Docker-compose labels when started from CLI ❌

labels:
      generated: true
      traefik.enable: false
      traefik.http.middlewares.glance-web-redirect.redirectscheme.scheme: https
      traefik.http.services.glance.loadbalancer.server.port: "8080"

Docker-compose labels when started from WebUI ✅

labels:
      generated: true
      traefik.enable: true
      traefik.http.middlewares.glance-web-redirect.redirectscheme.scheme: https
      traefik.http.services.glance.loadbalancer.server.port: "8080"
      traefik.http.routers.glance-local-insecure.rule: Host(`glance.${LOCAL_DOMAIN}`)
      traefik.http.routers.glance-local-insecure.entrypoints: web
      traefik.http.routers.glance-local-insecure.service: glance
      traefik.http.routers.glance-local-insecure.middlewares: glance-web-redirect
      traefik.http.routers.glance-local.rule: Host(`glance.${LOCAL_DOMAIN}`)
      traefik.http.routers.glance-local.entrypoints: websecure
      traefik.http.routers.glance-local.service: glance
      traefik.http.routers.glance-local.tls: true

As described this can be observed either from starting or stopping