docs(docker): Use bind mounts instead of docker volumes

Old volumes of `db` are replaced with bind mounts of `continuwuity-data`.
Other volumes are also converted. This is more beginner-friendly.
This commit is contained in:
stratself authored and Ellis Git committed 2026-10-28 23:23:59 +00:00
1 parent 2604b13ef6
commit 17d575c3e3
10 files changed
+68 -78

No files matched your search

+23 -10
View File
@@ -53,7 +53,7 @@ For more setups with `.well-known` delegation and split-domain deployments, cons
Docker Compose is the recommended deployment method for Continuwuity containers. The following environment variables will be set:
- `CONTINUWUITY_SERVER_NAME` - Your Matrix server's domain name. **This CANNOT be changed later without a data wipe.**
- `CONTINUWUITY_DATABASE_PATH` - Where to store your database. This must match the docker volume mount.
- `CONTINUWUITY_DATABASE_PATH` - Where to store your database. This must match the docker bind mount.
- `CONTINUWUITY_ADDRESS` - Bind address (for Docker, use `0.0.0.0` to listen on all interfaces).
Alternatively, you can specify a path to mount the configuration file using the `CONTINUWUITY_CONFIG` environment variable.
@@ -89,7 +89,9 @@ Consult the [**DNS tuning guide (recommended)**](../guides/dns.mdx) for full sol
<summary>docker-compose.with-caddy.yml ([view raw](/deploying/docker-compose.with-caddy.yml))</summary>
Create a Caddyfile with the following content:
Create a directory called `caddy-data`, which will store TLS certs obtained by Caddy.
Then, create a Caddyfile with the following content:
```
https://example.com:443, https://example.com:8448 {
@@ -97,7 +99,7 @@ https://example.com:443, https://example.com:8448 {
}
```
Then, for the docker-compose:
Then, for the docker compose file:
```yaml file="../public/deploying/docker-compose.with-caddy.yml"
@@ -110,6 +112,10 @@ Then, for the docker-compose:
<details>
<summary>docker-compose.with-caddy-labels.yml ([view raw](/deploying/docker-compose.with-caddy-labels.yml))</summary>
Create a directory called `caddy-data`, which will store TLS certs obtained by Caddy.
Then, for the docker compose file:
```yaml file="../public/deploying/docker-compose.with-caddy-labels.yml"
```
@@ -132,6 +138,10 @@ Then, for the docker-compose:
<details>
<summary>docker-compose.with-traefik.yml ([view raw](/deploying/docker-compose.with-traefik.yml))</summary>
Create a directory called `traefik-acme-data`, which will store TLS certs obtained by Caddy.
Then, for the docker compose file:
```yaml file="../public/deploying/docker-compose.with-traefik.yml"
```
@@ -164,10 +174,15 @@ See the [Other reverse proxies](generic.mdx#setting-up-the-reverse-proxy) sectio
### Starting Your Server
1. Choose your compose file from the above, and rename it to `docker-compose.yml`. Replace `example.com` with your homeserver's domain name, and edit other values as you see fit.
2. If using the override file, rename it to `docker-compose.override.yml` and
edit your values.
3. Start the server:
1. Create a directory named `continuwuity-data`. This will be where your server's database lives.
2. Choose your compose file from the above, and rename it to `docker-compose.yml`. Replace `example.com` with your homeserver's domain name, and edit other values as you see fit.
- Follow all extra instructions as needed.
- If using the override file, rename it to `docker-compose.override.yml` and edit your values.
3. Start the server with the following command:
```bash
docker compose up -d
@@ -189,9 +204,7 @@ See the [Other reverse proxies](generic.mdx#setting-up-the-reverse-proxy) sectio
Pick your own username and password!
```
5. Log in to your server with any Matrix client, and register for an account with the registration token from step 4. You'll automatically be invited to the admin room where you can [manage your server](../reference/admin).
See the [generic deployment guide](generic.mdx) for more deployment options.
5. Log in to your server with any Matrix client, and register for an account with the registration token from the previous step. You'll automatically be invited to the admin room where you can [manage your server](../reference/admin).
## Testing
@@ -6,7 +6,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-data:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
networks:
@@ -12,7 +12,7 @@ services:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data:/data
- ./caddy-data:/data
restart: unless-stopped
labels:
caddy: example.com
@@ -23,7 +23,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-data:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
# - ./continuwuity.toml:/etc/continuwuity.toml
environment:
@@ -46,8 +46,5 @@ services:
caddy: matrix.example.com
caddy.reverse_proxy: "{{upstreams 8008}}"
volumes:
db:
networks:
proxy:
@@ -9,7 +9,7 @@ services:
networks:
- caddy
volumes:
- ./data:/data
- ./caddy-data:/data
# mount your created Caddyfile into the container
- ./Caddyfile:/etc/caddy/Caddyfile
restart: unless-stopped
@@ -19,7 +19,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-data:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
# - ./continuwuity.toml:/etc/continuwuity.toml
environment:
@@ -41,6 +41,3 @@ services:
networks:
proxy:
volumes:
db:
@@ -6,7 +6,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-data:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
networks:
@@ -40,7 +40,7 @@ services:
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "acme:/etc/traefik/acme"
- "./traefik-acme-data:/etc/traefik/acme"
labels:
- "traefik.enable=true"
@@ -77,9 +77,5 @@ services:
TRAEFIK_PROVIDERS_DOCKER_ENDPOINT: "unix:///var/run/docker.sock"
TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT: false
volumes:
db:
acme:
networks:
proxy:
@@ -6,7 +6,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-data:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
networks:
@@ -18,7 +18,7 @@ services:
- "traefik.http.routers.continuwuity.tls=true"
- "traefik.http.routers.continuwuity.service=continuwuity"
- "traefik.http.services.continuwuity.loadbalancer.server.port=8008"
# possibly, depending on your config:
# enable tls with the `letsencrypt` certificate resolver (actual name dependant on your static config)
# - "traefik.http.routers.continuwuity.tls.certresolver=letsencrypt"
environment:
CONTINUWUITY_SERVER_NAME: example.com
@@ -34,9 +34,6 @@ services:
server=example.com:443
}
volumes:
db:
networks:
# This must match the network name that Traefik listens on
proxy:
@@ -12,7 +12,7 @@ services:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data:/data
- ./caddy-data:/data
restart: unless-stopped
homeserver:
@@ -20,7 +20,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-data:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
# - ./continuwuity.toml:/etc/continuwuity.toml
environment:
@@ -10,7 +10,7 @@ services:
networks:
- proxy
volumes:
- ./data:/data
- ./caddy-data:/data
# mount your created Caddyfile into the container
- ./Caddyfile:/etc/caddy/Caddyfile
restart: unless-stopped
@@ -20,7 +20,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-data:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
# - ./continuwuity.toml:/etc/continuwuity.toml
environment:
@@ -43,6 +43,3 @@ services:
networks:
proxy:
volumes:
db:
@@ -6,7 +6,7 @@ services:
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-data:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
networks:
@@ -40,7 +40,7 @@ services:
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "acme:/etc/traefik/acme"
- "./traefik-acme-data:/etc/traefik/acme"
labels:
- "traefik.enable=true"
@@ -77,9 +77,5 @@ services:
TRAEFIK_PROVIDERS_DOCKER_ENDPOINT: "unix:///var/run/docker.sock"
TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT: false
volumes:
db:
acme:
networks:
proxy:
+30 -33
View File
@@ -1,41 +1,38 @@
# Continuwuity - Bare Configuration (for other reverse proxies)
services:
homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped
command: /sbin/conduwuit
ports:
homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped
command: /sbin/conduwuit
ports:
# If your reverse proxy is on the host, use this
# and configure it to connect to `127.0.0.1:8008`
- 127.0.0.1:8008:8008
# If your reverse proxy is on the host, use this
# and configure it to connect to `127.0.0.1:8008`
- 127.0.0.1:8008:8008
# If your reverse proxy is on another machine, use this
# and configure it to connect to <this-machine-ip>:8008
# - 8008:8008
# If your reverse proxy is on another machine, use this
# and configure it to connect to <this-machine-ip>:8008
# - 8008:8008
# If your reverse proxy is a docker container on the same network,
# comment out the entire `ports` section, and configure it to connect to `continuwuity:8008`
# If your reverse proxy is a docker container on the same network,
# comment out the entire `ports` section, and configure it to connect to `continuwuity:8008`
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
volumes:
- ./continuwuity-data:/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
## (Optional) Serve .well-known files to tell others to reach Continuwuity on port :443
## If you do this, remove all routes to port :8448 on your reverse proxy
# CONTINUWUITY_WELL_KNOWN: |
# {
# client=https://example.com,
# server=example.com:443
# }
volumes:
db:
## (Optional) Serve .well-known files to tell others to reach Continuwuity on port :443
## If you do this, remove all routes to port :8448 on your reverse proxy
# CONTINUWUITY_WELL_KNOWN: |
# {
# client=https://example.com,
# server=example.com:443
# }