docs(docker): Revert to mounting /etc/resolv.conf as configs: won't work

* Fix wording to make mounting resolv.conf more imperative
* Linting and other changes
This commit is contained in:
stratself
2026-04-13 17:34:36 +00:00
committed by Ellis Git
parent 8bebec6687
commit 7f92659a98
6 changed files with 22 additions and 75 deletions
+6 -8
View File
@@ -113,24 +113,22 @@ See the [reference configuration](../reference/config) page for all config optio
These examples include reverse proxy configurations for Matrix federation, which will route your Matrix domain (and optionally .well-known paths) to Continuwuity. These examples include reverse proxy configurations for Matrix federation, which will route your Matrix domain (and optionally .well-known paths) to Continuwuity.
:::note Docker DNS Performance :::note Docker DNS Performance
Docker's default DNS resolver are [known to cause issues](../troubleshooting#dns-issues) for Matrix federation such as very slow federation or DNS timeouts. As a workaround, we will mount a custom `/etc/resolv.conf` config file into the Continuwuity service, in order to bypass Docker and use a more performant resolver. Docker's default DNS resolver are known to [cause timeout issues](../troubleshooting#dns-issues) for Matrix federation. To bypass it and use a more performant resolver, mount a custom `/etc/resolv.conf` config file into the Continuwuity container.
```yaml title='docker-compose.yml' ```yaml title='docker-compose.yml'
services: services:
homeserver: homeserver:
# ... # ...
configs: volumes:
- source: continuwuity-resolv.conf - ./continuwuity-resolv.conf:/etc/resolv.conf
target: /etc/resolv.conf ```
configs: ```txt title='continuwuity-resolv.conf'
continuwuity-resolv.conf:
content: |
nameserver 1.0.0.1 nameserver 1.0.0.1
nameserver 1.1.1.1 nameserver 1.1.1.1
``` ```
It is strongly recommended to consult the [**DNS tuning guide**](../advanced/dns) for full solutions to this issue. Consult the [**DNS tuning guide (recommended)**](../advanced/dns) for full solutions to this issue.
::: :::
#### Caddy (using Caddyfile) #### Caddy (using Caddyfile)
@@ -7,6 +7,7 @@ services:
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
- db:/var/lib/continuwuity - db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml #- ./continuwuity.toml:/etc/continuwuity.toml
networks: networks:
- proxy - proxy
@@ -34,14 +35,6 @@ services:
client=https://matrix.example.com, client=https://matrix.example.com,
server=matrix.example.com:443 server=matrix.example.com:443
} }
#cpuset: "0-4" # Uncomment to limit to specific CPU cores
ulimits: # Continuwuity uses quite a few file descriptors, and on some systems it defaults to 1024, so you can tell docker to increase it
nofile:
soft: 1048567
hard: 1048567
configs: # using custom resolver instead of Docker's
- source: continuwuity-resolv.conf
target: /etc/resolv.conf
volumes: volumes:
db: db:
@@ -51,9 +44,3 @@ networks:
# name, don't forget to change it here and in the docker-compose.override.yml # name, don't forget to change it here and in the docker-compose.override.yml
proxy: proxy:
external: true external: true
configs:
continuwuity-resolv.conf:
content: |
nameserver 1.0.0.1
nameserver 1.1.1.1
@@ -24,6 +24,7 @@ services:
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
- db:/var/lib/continuwuity - db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml #- ./continuwuity.toml:/etc/continuwuity.toml
environment: environment:
CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS
@@ -40,18 +41,8 @@ services:
labels: labels:
caddy: matrix.example.com caddy: matrix.example.com
caddy.reverse_proxy: "{{upstreams 8008}}" caddy.reverse_proxy: "{{upstreams 8008}}"
configs: # using custom resolver instead of Docker's
- source: continuwuity-resolv.conf
target: /etc/resolv.conf
volumes: volumes:
db: db:
networks: networks:
caddy: caddy:
configs:
continuwuity-resolv.conf:
content: |
nameserver 1.0.0.1
nameserver 1.1.1.1
@@ -20,6 +20,7 @@ services:
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
- db:/var/lib/continuwuity - db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml #- ./continuwuity.toml:/etc/continuwuity.toml
environment: environment:
CONTINUWUITY_SERVER_NAME: example.com CONTINUWUITY_SERVER_NAME: example.com
@@ -29,9 +30,6 @@ services:
#CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above #CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above
networks: networks:
- caddy - caddy
configs: # using custom resolvers instead of Docker's
- source: continuwuity-resolv.conf
target: /etc/resolv.conf
networks: networks:
caddy: caddy:
@@ -45,8 +43,3 @@ configs:
https://example.com, https://example.com:8448 { https://example.com, https://example.com:8448 {
reverse_proxy http://homeserver:8008 reverse_proxy http://homeserver:8008
} }
continuwuity-resolv.conf:
content: |
nameserver 1.0.0.1
nameserver 1.1.1.1
@@ -7,6 +7,7 @@ services:
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
- db:/var/lib/continuwuity - db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml #- ./continuwuity.toml:/etc/continuwuity.toml
networks: networks:
- proxy - proxy
@@ -31,14 +32,6 @@ services:
client=https://matrix.example.com, client=https://matrix.example.com,
server=matrix.example.com:443 server=matrix.example.com:443
} }
#cpuset: "0-4" # Uncomment to limit to specific CPU cores
ulimits: # Continuwuity uses quite a few file descriptors, and on some systems it defaults to 1024, so you can tell docker to increase it
nofile:
soft: 1048567
hard: 1048567
configs: # using custom resolver instead of Docker's
- source: continuwuity-resolv.conf
target: /etc/resolv.conf
traefik: traefik:
image: "traefik:latest" image: "traefik:latest"
@@ -91,9 +84,3 @@ volumes:
networks: networks:
proxy: proxy:
configs:
continuwuity-resolv.conf:
content: |
nameserver 1.0.0.1
nameserver 1.1.1.1
+1 -10
View File
@@ -9,6 +9,7 @@ services:
- 127.0.0.1:8008:8008 - 127.0.0.1:8008:8008
volumes: volumes:
- db:/var/lib/continuwuity - db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml #- ./continuwuity.toml:/etc/continuwuity.toml
environment: environment:
CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS
@@ -16,16 +17,6 @@ services:
CONTINUWUITY_ADDRESS: 0.0.0.0 CONTINUWUITY_ADDRESS: 0.0.0.0
CONTINUWUITY_PORT: 8008 CONTINUWUITY_PORT: 8008
#CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above #CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above
configs: # using custom resolver instead of Docker's
- source: continuwuity-resolv.conf
target: /etc/resolv.conf
volumes: volumes:
db: db:
configs:
continuwuity-resolv.conf:
content: |
nameserver 1.0.0.1
nameserver 1.1.1.1