Custom button, like the code-server one?
I setup a resource block like I saw in some of the example Coder templates for a different service running in my workspace, Tilt:
The button shows up on my workspace dashboard in Coder, and seems to accurately reflect the status (yay!).
But trying to navigate to it and all my assets are broken; I think because they are relative to the root
/asset/path
and not relative ./asset/path
.
I saw https://github.com/coder/coder/pull/4263 was recently pushed, but I don't understand how this helps with relative_path
going away... or is that not related?
I tried changing subdomain = true
but that made no discernible difference.
Confused.GitHub
feat: use app wildcards for apps if configured by deansheather ยท Pu...
Adds subdomain to the WorkspaceApp struct.
Changes the dashboard to use subdomain app access if subdomain is true and an app hostname is set.
Add a tooltip explaining why the app button is greyed o...
3 Replies
https://coder.com/docs/coder-oss/latest/admin/configure#wildcard-access-url
If you set up wildcard routing for your Coder deployment, then you can serve apps at
/
!Configuration - Coder OSS main docs
Learn how to configure Coder.
I had planned to use subdomains to make my apps directly accessible... possibly with more than one ingress. Will this mess with that at all, AFAYK? Admittedly I hadn't gotten far enough in my Coder setup to get this working yet...
As an example:
-
tenant-1.state.workspace-name.coder.tld.dev
=> resolves to k8s cluster
- tenant-2.state.workspace-name.coder.tld.dev
=> resolves to k8s cluster
- etc.
- coder.tld.dev
=> resolves to Coder
- *.coder.tld.dev
=> resolves to Coder (suggestion above, with CODER_WILDCARD_ACCESS_URL
)
Ok, happy to report I got things working. Here are some notes about things I was missing from before:
- The docs @kyle mentioned are necessary, but they're only part of the picture. You also need to ensure you're running Coder 0.9.7+ (I was previously on Coder 0.9.3, which didn't support the work on subdomain
from the linked issue above). ๐คฆโโ๏ธ
- Still need to provide url
in the resource block for coder_app
, but it should be the localhost:PORT
format (as if you were accessing it directly on the workspace host); Coder will automagically turn that into a subdomain link if subdomain = true
but you (read: me) don't have to manually make that link yourself! ๐
- Also, my DNS was wrong, as I wasn't resolving my wildcard domain correctly. So yeah, make sure your DNS is sorted before head-banging too much on Coder or your provision scripts. ๐ถ
- I rejiggered my domain names to put the coder.*
and *.coder.*
adjacent to (but not direct parents of) my other planned subdomain routes, so my earlier concern should be negated, if it was even valid to begin with. ๐คทโโ๏ธ
Continue to be amazed by how flexible, powerful, and (ultimately) easy Coder has been... I'm not ready to add "intuitive" to that list quite yet, but I am happy to discover my issues have simple solutions (so far, at least!) knocks on woodI appreciate the thorough description of little nits you encountered. Hopefully we can add intuitive to the lit soon enough ๐