mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
docs(docker): Add Caddy via Caddyfile deployment and prioritise them
* Add compose and included Caddyfile using caddy:latest official image * Rename old Caddy files as caddy-labels.yml and new one as caddy.yml * Remove external: true network in caddy-labels.yml to simplify docs * Move all Caddy selections to top, unprioritize Traefik and other RPs
This commit is contained in:
@@ -0,0 +1,49 @@
|
|||||||
|
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: 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
|
||||||
|
|
||||||
|
homeserver:
|
||||||
|
image: forgejo.ellis.link/continuwuation/continuwuity:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
command: /sbin/conduwuit
|
||||||
|
volumes:
|
||||||
|
- db:/var/lib/continuwuity
|
||||||
|
- /etc/resolv.conf:/etc/resolv.conf:ro # Use the host's DNS resolver 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
|
||||||
|
|
||||||
|
# Required for .well-known delegation - edit these according to your chosen domain
|
||||||
|
CONTINUWUITY_WELL_KNOWN__CLIENT: https://matrix.example.com
|
||||||
|
CONTINUWUITY_WELL_KNOWN__SERVER: matrix.example.com:443
|
||||||
|
networks:
|
||||||
|
- caddy
|
||||||
|
labels:
|
||||||
|
caddy: matrix.example.com
|
||||||
|
caddy.reverse_proxy: "{{upstreams 8008}}"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
caddy:
|
||||||
@@ -1,23 +1,32 @@
|
|||||||
|
networks:
|
||||||
|
caddy:
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db:
|
||||||
|
|
||||||
|
configs:
|
||||||
|
dynamic.yml:
|
||||||
|
content: |
|
||||||
|
https://example.com, https://example.com:8448 {
|
||||||
|
reverse_proxy http://homeserver:8008
|
||||||
|
}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
# This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity!
|
image: docker.io/caddy:latest
|
||||||
# For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy
|
|
||||||
image: lucaslorentz/caddy-docker-proxy:ci-alpine
|
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
environment:
|
- 8448:8448
|
||||||
- CADDY_INGRESS_NETWORKS=caddy
|
|
||||||
networks:
|
networks:
|
||||||
- caddy
|
- caddy
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- ./data:/data
|
- ./data:/data
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
labels:
|
configs:
|
||||||
caddy: example.com
|
- source: Caddyfile
|
||||||
caddy.reverse_proxy: /.well-known/matrix/* homeserver:8008
|
target: /etc/caddy/Caddyfile
|
||||||
|
|
||||||
homeserver:
|
homeserver:
|
||||||
image: forgejo.ellis.link/continuwuation/continuwuity:latest
|
image: forgejo.ellis.link/continuwuation/continuwuity:latest
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -27,24 +36,10 @@ services:
|
|||||||
- /etc/resolv.conf:/etc/resolv.conf:ro # Use the host's DNS resolver rather than Docker's.
|
- /etc/resolv.conf:/etc/resolv.conf:ro # Use the host's DNS resolver 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
|
||||||
CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity
|
CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity
|
||||||
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
|
||||||
|
|
||||||
# Required for .well-known delegation - edit these according to your chosen domain
|
|
||||||
CONTINUWUITY_WELL_KNOWN__CLIENT: https://matrix.example.com
|
|
||||||
CONTINUWUITY_WELL_KNOWN__SERVER: matrix.example.com:443
|
|
||||||
networks:
|
networks:
|
||||||
- caddy
|
- caddy
|
||||||
labels:
|
|
||||||
caddy: matrix.example.com
|
|
||||||
caddy.reverse_proxy: "{{upstreams 8008}}"
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
db:
|
|
||||||
|
|
||||||
networks:
|
|
||||||
caddy:
|
|
||||||
external: true
|
|
||||||
+22
-19
@@ -147,6 +147,28 @@ See [Troubleshooting - DNS Issues](../troubleshooting.mdx#potential-dns-issues-w
|
|||||||
for more details and alternative solutions.
|
for more details and alternative solutions.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
#### With Caddy (using Caddyfile)
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>docker-compose.with-caddy.yml</summary>
|
||||||
|
|
||||||
|
```yaml file="./docker-compose.with-caddy.yml"
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
#### With Caddy (using labels)
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>docker-compose.with-caddy-labels.yml</summary>
|
||||||
|
|
||||||
|
```yaml file="./docker-compose.with-caddy-labels.yml"
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
#### For existing Traefik setup
|
#### For existing Traefik setup
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
@@ -169,25 +191,6 @@ for more details and alternative solutions.
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
#### With Caddy Docker Proxy
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>docker-compose.with-caddy.yml</summary>
|
|
||||||
|
|
||||||
Replace all `example.com` placeholders with your own domain.
|
|
||||||
|
|
||||||
```yaml file="./docker-compose.with-caddy.yml"
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
If you don't already have a network for Caddy to monitor, create one first:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker network create caddy
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
#### For other reverse proxies
|
#### For other reverse proxies
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|||||||
Reference in New Issue
Block a user