dokploy icon indicating copy to clipboard operation
dokploy copied to clipboard

Add support for regex host and priority for domain

Open aboutrax opened this issue 1 year ago • 3 comments

What problem will this feature address?

I am trying to deploy Zrok which create custom host on the fly like ******.share.example.com using docker compose.

Describe the solution you'd like

Add the possibility for specifying if the host must be regexed and the priority when creating the domain. For example in my case: zrok.share.example.com -> zrok-controller:18080 with priority 1 *.share.example.com -> zrok-frontend:80 with priority 100

Describe alternatives you've considered

I have tried to update the traefik directory without success

Additional context

No response

Will you send a PR to implement it?

Yes

aboutrax avatar Sep 07 '25 22:09 aboutrax

Image Image

aboutrax avatar Sep 08 '25 04:09 aboutrax

Your prio should be the other way around Higher number = higher priority So you would want a named sub domain matched before the wildcard

Regexp rule would be ^.+\.share\.example\.com$

Don't forget to use dns challenge for let's encrypt or add wildcard cert manually as http challenge does not work for wildcards.

djsisson avatar Sep 08 '25 05:09 djsisson

I have added priority.

Image

In the case where priority > 0 the correct traefik label is added.

Image

Could you take a look at https://github.com/traxyax/dokploy/tree/host-regex

aboutrax avatar Sep 08 '25 18:09 aboutrax