-
Notifications
You must be signed in to change notification settings - Fork 104
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
add self-hosted Docker zrok-instance #505
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Very interested in this |
Thanks for saying so, @deanpcmad! Will you share how you plan to run the OpenZiti instance that your zrok will use, e.g., k8s, expressInstall() compose, all-in-one compose, directly on Linux, etc? zrok needs a ziti management API address and credential so it can bootstrap its own overlay, so there's no requirement that ziti is running in the same compose project, but it might be convenient if it is. |
If it can all go in the same docker compose file, that's fine by me! That's always the issue with these kinda things, when you need multiple services to run, but if it's all in the same file it makes things much easier |
@deanpcmad That's what I was thinking. Compose has this neat merge feature that happens when you have two compose files with the magic names |
looking forward to a ping of this once released |
+1 |
I gave this some thought today. I can see two alternatives: a more robust, complete solution and one that's quicker to ship. The quick solution would be a sample compose project directory you can download from GitHub. It requires the user to know how to configure zrok. This requires the user to employ Docker Compose and run everything in one project because we must build the container images just-in-time with the modified configs and we must make certain assumptions in the configs for the sake of simplicity. The more production-ready and complete solution introduces Linux packages and container images for the zrok controller and zrok frontend to the zrok release job. Both would use a new feature in zrok CLI to generate a valid configuration for the deployment (compose file or systemd env file) from a minimal set of input values, or you can bring your own config. This gives greater flexibility for different types of zrok deployments by separating the controller and frontend as discrete deployments (link to discussion issue about this idea). |
For this branch, I'll focus on the quick, minimal solution, but please continue to add ideas and feedback here about running your own zrok in Docker. |
a0580d7
to
a9c87ce
Compare
Merging phase 1 of 3:
|
Hooray! Where I can subscribe to the next phase, where all the things are in one docker-compose.yml? Is there an issue about it? |
Good idea. Here's an issue for the next phase: #613 Will you test drive this phase when it's released? I've got one PR pending review, then I'll ask for a release stamp to build everything out. The instructions in the doc site won't work until then. |
Cool! Thank you for the issue :) I definitely will test the version with one compose file, yes. |
Yep! You can delete the caddy service container and replace it with your preferred TLS load balancer. Ensure NGINX is configured to terminate TLS with your cert and has upstreams for the controller (zrok.$ZROK_DNS_ZONE), OAuth (if wanted, oauth.${ZROK_DNS_ZONE}, and a wildcard/catchall for your zrok frontend to handle public shares *.${ZROK_DNS_ZONE}. I asked ChatGPT to translate the new zrok-instance for Docker's Caddyfile for NGINX. This looks believably close, but I haven't tested it. There's an NGINX guide in our self-hosting docs, though not tailored for Docker, that you might find helpful too.
Please ensure you send the original host header when forwarding requests to the frontend container because it needs that info to route the request to the zrok share backend. |
🚧
work in progress