Update README.md

This commit is contained in:
max_richter 2025-05-12 14:51:42 +02:00
parent 69b2ddf40b
commit 7b881e5da1

View File

@ -60,26 +60,21 @@ docker compose up -d --force-recreate traefik
For example `dev.cool` 😎 For example `dev.cool` 😎
Replace `.dev.local` with your custom domain suffix in the `config/traefik/traefik.yml` file: Replace `.dev.local` with your custom domain suffix in the `config/traefik/traefik.yml` file:
```yaml ```diff
... docker:
docker: defaultRule: |
defaultRule: | - Host(`{{ trim (index .Labels "serviceName") }}.dev.local`) {{range $i, $domain := splitList "," (index .Labels "serviceDomains")}}{{if ne $domain ""}}|| Host(`{{$domain}}`){{end}}{{end}}
Host(`{{ trim (index .Labels "serviceName") }}.dev.cool`) {{range $i, $domain := splitList "," (index .Labels "serviceDomains")}}{{if ne $domain ""}}|| Host(`{{$domain}}`){{end}}{{end}} + Host(`{{ trim (index .Labels "serviceName") }}.dev.cool`) {{range $i, $domain := splitList "," (index .Labels "serviceDomains")}}{{if ne $domain ""}}|| Host(`{{$domain}}`){{end}}{{end}}
... constraints: LabelRegex(`serviceName`, `.+`) && !Label(`com.docker.compose.oneoff`, `True`)
``` ```
Replace `.dev.local` with your custom domain suffix in the `config/dns/config.sample.json` file: Replace `.dev.local` with your custom domain suffix in the `config/dns/config.sample.json` file:
```json ```diff
... {
{ "id": 2,
"id": 2, - "hostname": ".dev.local",
"hostname": ".dev.cool", + "hostname": ".dev.cool",
"ip": "", "ip": "",
"target": "host.docker",
"ttl": 3600,
"type": "CNAME"
}
...
``` ```
Remove the dns_config volume Remove the dns_config volume