Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-Determine tunnels for apps #6

Open
bijeebuss opened this issue Feb 8, 2024 · 5 comments
Open

Pre-Determine tunnels for apps #6

bijeebuss opened this issue Feb 8, 2024 · 5 comments

Comments

@bijeebuss
Copy link

I had an idea for how to potentially use this to solve an issue with trying to setup fedimint as an umbrel app. but I think it could also be relevant for other apps. Fedimint needs to be available publicly and it needs to know what URL its available on before even starting up.

What are your thoughts on this change?:

This app could have a UI section where you associate one of your tunnels with an umbrel app ID. Then it writes the URL to a file somewhere in the app data like /data/umbrel-apps/my_umbrel_app_id and the contents of that file would just be the public URL you will be pointing to the app. This way when the fedimint app starts up it can mount the cloudflared app data dir somewhere and then read its URL from the file based on its app ID.

Or maybe there is an easier way to achieve this by setting a metadata flag on the tunnel or something and then using curl to get it?

@Radiokot
Copy link
Owner

Radiokot commented Feb 8, 2024

This app is a tunnel connector, it can't manage the routes. The routes are managed under your Cloudflare Zero Trust dashboard. If I correctly unredstood what you are asking for, I think it can't be done.

If I had a service requiring some preparation before starting up, I would:

  • Create a configuration service with a UI to make all the preparations;
  • Add this configuration service to the compose with custom healthcheck for it, so it reports healthy status only if successfully configured;
  • Make the main service dependent on the configuration with depends_on.

@bijeebuss
Copy link
Author

It can't manage the routes but it can list them right? That would be sufficient to do this. But either way I think like your idea better anyway

@Radiokot
Copy link
Owner

Radiokot commented Feb 8, 2024

Good luck 😉

@bijeebuss
Copy link
Author

bijeebuss commented Feb 8, 2024 via email

@Radiokot
Copy link
Owner

Radiokot commented Feb 8, 2024

No, just had this idea. This is a creative hacking/patching when you can't modify the original software 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants