EnigmaCurry / d.rymcg.tech

A collection of self-hosted docker-compose projects with Traefik reverse proxy, integrated auth, and administrative Makefiles for easy maintainance
MIT License
46 stars 9 forks source link

Refactor Traefik entrypoint menu to be dynamic with add / delete system. #216

Open EnigmaCurry opened 1 month ago

EnigmaCurry commented 1 month ago

Right now its a static list of entrypoints

Not wanting to break existing config, I propose creating a new variable TRAEFIK_EXTRA_ENTRYPOINTS:

TRAEFIK_EXTRA_ENTRYPOINTS=[[ENTRYPOINT_NAME, ENTRYPOINT_ADDRESS, ENTRYPOINT_PORT], ... ]

and to augment the config interface to use a wizard to manage the custom entrypoint names, addresses, ports.

This would help make apps like Gitea/Forgejo instantiable, which have SSH port mappings, which makes instantiation tricky. Traefik does not know how to proxy SSH, but it does know how to proxy TCP, but this means that each instance requires its own dedicated port, no sharing. Having the ability to create new entrypoints in the traefik config, and then referencing those names in our app (APP_TRAEFIK_ENTRYPOINT) means that are able to keep using the few TCP middlewares that Traefik offers, like IP address filtering. Essentially this only uses Traefik as a firewall, but it does keep all of the config inside of our .env file, which is rule 1 of this project.