Skip to content

Commit 85af4dd

Browse files
committed
docs(ingress): add wildcard domain usage example
1 parent 4524ef1 commit 85af4dd

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

custom-domain/dstack-ingress/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,39 @@ The dstack-ingress now supports multiple domains in a single container:
5353
- Each domain gets its own SSL certificate
5454
- Flexible nginx configuration per domain
5555

56+
### Wildcard Domain Support
57+
58+
You can use a wildcard domain (e.g. `*.myapp.com`) to route all subdomains to a single dstack application:
59+
60+
- The TXT record is automatically set as `_dstack-app-address-wildcard.myapp.com` (instead of `_dstack-app-address.*.myapp.com`)
61+
- CAA records use the `issuewild` tag on the base domain
62+
- Requires dstack-gateway with wildcard TXT resolution support ([dstack#545](https://github.com/Dstack-TEE/dstack/pull/545))
63+
64+
```yaml
65+
services:
66+
dstack-ingress:
67+
image: dstacktee/dstack-ingress:latest
68+
ports:
69+
- "443:443"
70+
environment:
71+
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
72+
- DOMAIN=*.myapp.com
73+
- GATEWAY_DOMAIN=_.dstack-prod5.phala.network
74+
- CERTBOT_EMAIL=${CERTBOT_EMAIL}
75+
- SET_CAA=true
76+
- TARGET_ENDPOINT=http://app:80
77+
volumes:
78+
- /var/run/dstack.sock:/var/run/dstack.sock
79+
- /var/run/tappd.sock:/var/run/tappd.sock
80+
- cert-data:/etc/letsencrypt
81+
restart: unless-stopped
82+
app:
83+
image: nginx
84+
restart: unless-stopped
85+
volumes:
86+
cert-data:
87+
```
88+
5689
## Usage
5790
5891
### Prerequisites

0 commit comments

Comments
 (0)