I’m setting up a server with both a jupyterhub instance and OMERO, to which other applications might be added later. The omero platform runs inside a docker, and for now the jupyterhub is ran by a user directly in a virtual env.
I have been using Caddy as a proxy & reverse proxy for the server, but as jupyterhub uses traefik, I was wondering if I should pass all through traefik or declare caddy as the proxy (and subclass the Proxy class).
There is a brief mention of caddy being used as a proxy, but it is really brief.
There are potentially multiple proxies involved with jupyterhub:
the jupyterhub proxy between jupyterhub and the singleuser servers: jupyterhub dynamically updates the routes whenever singleuser servers are started/stopped
an optional web proxy between jupyterhub/other apps and the internet.
The brief mention of caddy is the latter, so your easiest option is to treat OMERO and jupyterhub (including the JupyterHub proxy) as backend services, and use Caddy as your front-end.
I don’t know whether it’s possible to add routes to the JupyterHub Traefik proxy.
jupyterhub-traefik-proxy splits configuration into two stages:
“static” configuration loaded at start
“dynamic” configuration that’s kept up-to-date
The “dynamic” configuration is the routing table that changes during the runtime of JupyterHub. The “static” configuration is the basics to get traefik running (like http endpoint, acme configuration, etc.), and can contain any custom routes you might want. If you check the docs for externally managed deployments of traefik, this is probably the best way to deploy traefik with your own configuration file that can have any additional routes you might want. There are separate examples for using toml, etcd, and consul to store the routing table used to store the dynamic config.