Skip to content

Does Dokploy support wildcard subdomains and custom domain routing? #2057

Answered by djsisson
cunpingtai asked this question in Q&A
Discussion options

You must be logged in to vote

@cunpingtai afaik dokploy only uses Host rules not HostRegexp so i think you will have to add your own dynamic file

http:
  routers:
    myapp-router:
      entryPoints:
        - web
        - websecure
      rule: "HostRegexp(`^([a-z0-9-]+)\\.example\\.com$`)"
      service: myapp-service
      tls: {}

  services:
    myapp-service:
      loadBalancer:
        servers:
          - url: "http://myapp:3000"

'myapp' needs to match the service name in your compose, add any middleware or alter tls settings as required, this matches all subdomains on example.com

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cunpingtai
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants