From 144ff894471082a26ace4e33c79e093123602e3f Mon Sep 17 00:00:00 2001 From: stratself Date: Fri, 31 Jul 2026 11:30:40 +0000 Subject: [PATCH] docs(docker,delegation): Edit compose examples with Caddy * Use 2-spaces indentation instead of 4 * Use `proxy` as network name instead of `caddy` to be consistent * Mount Caddyfile for delegated example as well --- docs/guides/delegation.mdx | 9 ++ ...gated.docker-compose.with-caddy-labels.yml | 89 ++++++++++--------- .../delegated.docker-compose.with-caddy.yml | 81 ++++++++--------- .../docker-compose.with-caddy-labels.yml | 85 +++++++++--------- .../deploying/docker-compose.with-caddy.yml | 76 ++++++++-------- 5 files changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/guides/delegation.mdx b/docs/guides/delegation.mdx index 3d3245cc7..338f9e560 100644 --- a/docs/guides/delegation.mdx +++ b/docs/guides/delegation.mdx @@ -219,6 +219,15 @@ The following Compose files are taken from [Docker instructions](../deploying/do ``` +```txt title="Caddyfile" +https://matrix.example.com:443 { + reverse_proxy http://homeserver:8008 +} +https://example.com:443 { + reverse_proxy /.well-known/matrix* http://homeserver:8008 +} +``` +
diff --git a/docs/public/advanced/delegated.docker-compose.with-caddy-labels.yml b/docs/public/advanced/delegated.docker-compose.with-caddy-labels.yml index 5ce6f1f5b..d0477a792 100644 --- a/docs/public/advanced/delegated.docker-compose.with-caddy-labels.yml +++ b/docs/public/advanced/delegated.docker-compose.with-caddy-labels.yml @@ -1,54 +1,55 @@ # Continuwuity - With Caddy Labels services: - caddy: - # This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity! - # For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy - image: "docker.io/lucaslorentz/caddy-docker-proxy:ci-alpine" - ports: - - 80:80 - - 443:443 - environment: - - CADDY_INGRESS_NETWORKS=caddy - networks: - - caddy - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - ./data:/data - restart: unless-stopped - labels: - caddy: example.com - caddy.reverse_proxy: /.well-known/matrix/* homeserver:8008 + caddy: + # This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity! + # For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy + image: "docker.io/lucaslorentz/caddy-docker-proxy:ci-alpine" + ports: + - 80:80 + - 443:443 + environment: + - CADDY_INGRESS_NETWORKS=caddy + networks: + - proxy + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ./data:/data + restart: unless-stopped + labels: + caddy: example.com + caddy.reverse_proxy: /.well-known/matrix/* homeserver:8008 - homeserver: - image: "forgejo.ellis.link/continuwuation/continuwuity:latest" - restart: unless-stopped - command: /sbin/conduwuit - volumes: - - db:/var/lib/continuwuity - - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's - #- ./continuwuity.toml:/etc/continuwuity.toml - environment: - CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS - CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity - CONTINUWUITY_ADDRESS: 0.0.0.0 - CONTINUWUITY_PORT: 8008 - #CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above + homeserver: + image: "forgejo.ellis.link/continuwuation/continuwuity:latest" + restart: unless-stopped + command: /sbin/conduwuit + volumes: + - db:/var/lib/continuwuity + - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's + # - ./continuwuity.toml:/etc/continuwuity.toml + environment: + CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS + CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity + CONTINUWUITY_ADDRESS: 0.0.0.0 + CONTINUWUITY_PORT: 8008 + # CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above - # Serve .well-known files to tell others to reach Continuwuity on port :443 - CONTINUWUITY_WELL_KNOWN: | - { - client=https://matrix.example.com, - server=matrix.example.com:443 - } + # Serve .well-known files to tell others to reach Continuwuity on port :443 + CONTINUWUITY_WELL_KNOWN: | + { + client=https://matrix.example.com, + server=matrix.example.com:443 + } + + networks: + - proxy + labels: + caddy: matrix.example.com + caddy.reverse_proxy: "{{upstreams 8008}}" - networks: - - caddy - labels: - caddy: matrix.example.com - caddy.reverse_proxy: "{{upstreams 8008}}" volumes: db: networks: - caddy: + proxy: diff --git a/docs/public/advanced/delegated.docker-compose.with-caddy.yml b/docs/public/advanced/delegated.docker-compose.with-caddy.yml index 2f623a236..99c3b3435 100644 --- a/docs/public/advanced/delegated.docker-compose.with-caddy.yml +++ b/docs/public/advanced/delegated.docker-compose.with-caddy.yml @@ -1,57 +1,46 @@ # Continuwuity - Using Caddy Docker Image services: - caddy: - image: "docker.io/caddy:latest" - ports: - - 80:80 - - 443:443 - networks: - - caddy - volumes: - - ./data:/data - restart: unless-stopped - configs: - - source: Caddyfile - target: /etc/caddy/Caddyfile + caddy: + image: "docker.io/caddy:latest" + ports: + - 80:80 + - 443:443 + networks: + - caddy + volumes: + - ./data:/data + # mount your created Caddyfile into the container + - ./Caddyfile:/etc/caddy/Caddyfile + restart: unless-stopped - homeserver: - image: "forgejo.ellis.link/continuwuation/continuwuity:latest" - restart: unless-stopped - command: /sbin/conduwuit - volumes: - - db:/var/lib/continuwuity - - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's - #- ./continuwuity.toml:/etc/continuwuity.toml - environment: - CONTINUWUITY_SERVER_NAME: example.com - CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity - CONTINUWUITY_ADDRESS: 0.0.0.0 - CONTINUWUITY_PORT: 8008 - #CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above + homeserver: + image: "forgejo.ellis.link/continuwuation/continuwuity:latest" + restart: unless-stopped + command: /sbin/conduwuit + volumes: + - db:/var/lib/continuwuity + - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's + # - ./continuwuity.toml:/etc/continuwuity.toml + environment: + CONTINUWUITY_SERVER_NAME: example.com + CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity + CONTINUWUITY_ADDRESS: 0.0.0.0 + CONTINUWUITY_PORT: 8008 + # CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above - ## Serve .well-known files to tell others to reach Continuwuity on port :443 - CONTINUWUITY_WELL_KNOWN: | - { - client=https://matrix.example.com, - server=matrix.example.com:443 - } + ## Serve .well-known files to tell others to reach Continuwuity on port :443 + CONTINUWUITY_WELL_KNOWN: | + { + client=https://example.com, + server=example.com:443 + } - networks: - - caddy + networks: + - proxy networks: - caddy: + proxy: volumes: db: - -configs: - Caddyfile: - content: | - https://matrix.example.com:443 { - reverse_proxy http://homeserver:8008 - } - https://example.com:443 { - reverse_proxy /.well-known/matrix* http://homeserver:8008 - } diff --git a/docs/public/deploying/docker-compose.with-caddy-labels.yml b/docs/public/deploying/docker-compose.with-caddy-labels.yml index d80f5e01c..5b75bad59 100644 --- a/docs/public/deploying/docker-compose.with-caddy-labels.yml +++ b/docs/public/deploying/docker-compose.with-caddy-labels.yml @@ -1,51 +1,52 @@ # Continuwuity - With Caddy Labels services: - caddy: - # This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity! - # For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy - image: "docker.io/lucaslorentz/caddy-docker-proxy:ci-alpine" - ports: - - 80:80 - - 443:443 - environment: - - CADDY_INGRESS_NETWORKS=caddy - networks: - - caddy - volumes: - - /var/run/docker.sock:/var/run/docker.sock - - ./data:/data - restart: unless-stopped + caddy: + # This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity! + # For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy + image: "docker.io/lucaslorentz/caddy-docker-proxy:ci-alpine" + ports: + - 80:80 + - 443:443 + environment: + - CADDY_INGRESS_NETWORKS=caddy + networks: + - proxy + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ./data:/data + restart: unless-stopped - homeserver: - image: "forgejo.ellis.link/continuwuation/continuwuity:latest" - restart: unless-stopped - command: /sbin/conduwuit - volumes: - - db:/var/lib/continuwuity - - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's - #- ./continuwuity.toml:/etc/continuwuity.toml - environment: - CONTINUWUITY_SERVER_NAME: example.com - CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity - CONTINUWUITY_ADDRESS: 0.0.0.0 - CONTINUWUITY_PORT: 8008 - #CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above + homeserver: + image: "forgejo.ellis.link/continuwuation/continuwuity:latest" + restart: unless-stopped + command: /sbin/conduwuit + volumes: + - db:/var/lib/continuwuity + - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's + # - ./continuwuity.toml:/etc/continuwuity.toml + environment: + CONTINUWUITY_SERVER_NAME: example.com + CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity + CONTINUWUITY_ADDRESS: 0.0.0.0 + CONTINUWUITY_PORT: 8008 + # CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above - # Serve .well-known files to tell others to reach Continuwuity on port :443 - CONTINUWUITY_WELL_KNOWN: | - { - client=https://example.com, - server=example.com:443 - } + # Serve .well-known files to tell others to reach Continuwuity on port :443 + CONTINUWUITY_WELL_KNOWN: | + { + client=https://example.com, + server=example.com:443 + } + + networks: + - proxy + labels: + caddy: example.com + caddy.reverse_proxy: "{{upstreams 8008}}" - networks: - - caddy - labels: - caddy: example.com - caddy.reverse_proxy: "{{upstreams 8008}}" volumes: - db: + db: networks: - caddy: + proxy: diff --git a/docs/public/deploying/docker-compose.with-caddy.yml b/docs/public/deploying/docker-compose.with-caddy.yml index 533604b32..7f8d83fbf 100644 --- a/docs/public/deploying/docker-compose.with-caddy.yml +++ b/docs/public/deploying/docker-compose.with-caddy.yml @@ -1,48 +1,48 @@ # Continuwuity - Using Caddy Docker Image services: - caddy: - image: "docker.io/caddy:latest" - ports: - - 80:80 - - 443:443 - - 8448:8448 - networks: - - caddy - volumes: - - ./data:/data - # mount your created Caddyfile into the container - - ./Caddyfile:/etc/caddy/Caddyfile - restart: unless-stopped + caddy: + image: "docker.io/caddy:latest" + ports: + - 80:80 + - 443:443 + - 8448:8448 + networks: + - proxy + volumes: + - ./data:/data + # mount your created Caddyfile into the container + - ./Caddyfile:/etc/caddy/Caddyfile + restart: unless-stopped - homeserver: - image: "forgejo.ellis.link/continuwuation/continuwuity:latest" - restart: unless-stopped - command: /sbin/conduwuit - volumes: - - db:/var/lib/continuwuity - - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's - #- ./continuwuity.toml:/etc/continuwuity.toml - environment: - CONTINUWUITY_SERVER_NAME: example.com - CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity - CONTINUWUITY_ADDRESS: 0.0.0.0 - CONTINUWUITY_PORT: 8008 - #CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above + homeserver: + image: "forgejo.ellis.link/continuwuation/continuwuity:latest" + restart: unless-stopped + command: /sbin/conduwuit + volumes: + - db:/var/lib/continuwuity + - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's + # - ./continuwuity.toml:/etc/continuwuity.toml + environment: + CONTINUWUITY_SERVER_NAME: example.com + CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity + CONTINUWUITY_ADDRESS: 0.0.0.0 + CONTINUWUITY_PORT: 8008 + # CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above - ## (Optional) Serve .well-known files to tell others to reach Continuwuity on port :443 - ## If you do this, remove all routes to port :8448 from the compose and Caddyfile - # CONTINUWUITY_WELL_KNOWN: | - # { - # client=https://example.com, - # server=example.com:443 - # } + ## (Optional) Serve .well-known files to tell others to reach Continuwuity on port :443 + ## If you do this, remove all routes to port :8448 from the compose and Caddyfile + # CONTINUWUITY_WELL_KNOWN: | + # { + # client=https://example.com, + # server=example.com:443 + # } - networks: - - caddy + networks: + - proxy networks: - caddy: + proxy: volumes: - db: + db: