docs/misc: update to align with Docker Compose v2 (#3295)

* rename: `docker-compose.yml` => `compose.yaml`
* rename: `docker-compose` => `docker compose`
This commit is contained in:
Georg Lauterbach 2023-05-10 11:02:44 +02:00 committed by GitHub
parent 652bbd831f
commit c461dabe9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 84 additions and 84 deletions

View file

@ -55,7 +55,7 @@ While indexing is memory intensive, you can configure the plugin to limit the am
adjust the settings to tune for your desired memory limits, exclude folders and enable searching text inside of attachments
2. Update `docker-compose.yml` to load the previously created dovecot plugin config file:
2. Update `compose.yaml` to load the previously created dovecot plugin config file:
```yaml
services:
@ -86,20 +86,20 @@ While indexing is memory intensive, you can configure the plugin to limit the am
3. Recreate containers:
```
docker-compose down
docker-compose up -d
docker compose down
docker compose up -d
```
4. Initialize indexing on all users for all mail:
```
docker-compose exec mailserver doveadm index -A -q \*
docker compose exec mailserver doveadm index -A -q \*
```
5. Run the following command in a daily cron job:
```
docker-compose exec mailserver doveadm fts optimize -A
docker compose exec mailserver doveadm fts optimize -A
```
Or like the [Spamassassin example][docs-faq-sa-learn-cron] shows, you can instead use `cron` from within DMS to avoid potential errors if the mail server is not running:
@ -108,7 +108,7 @@ While indexing is memory intensive, you can configure the plugin to limit the am
Create a _system_ cron file:
```sh
# in the docker-compose.yml root directory
# in the compose.yaml root directory
mkdir -p ./docker-data/dms/cron # if you didn't have this folder before
touch ./docker-data/dms/cron/fts_xapian
chown root:root ./docker-data/dms/cron/fts_xapian
@ -127,7 +127,7 @@ While indexing is memory intensive, you can configure the plugin to limit the am
0 4 * * * root doveadm fts optimize -A
```
Then with `docker-compose.yml`:
Then with `compose.yaml`:
```yaml
services:
@ -148,7 +148,7 @@ However, Solr also requires a fair bit of RAM. While Solr is [highly tuneable](h
#### Setup
1. `docker-compose.yml`:
1. `compose.yaml`:
```yaml
solr:
@ -180,9 +180,9 @@ However, Solr also requires a fair bit of RAM. While Solr is [highly tuneable](h
}
```
3. Recreate containers: `docker-compose down ; docker-compose up -d`
3. Recreate containers: `docker compose down ; docker compose up -d`
4. Flag all user mailbox FTS indexes as invalid, so they are rescanned on demand when they are next searched: `docker-compose exec mailserver doveadm fts rescan -A`
4. Flag all user mailbox FTS indexes as invalid, so they are rescanned on demand when they are next searched: `docker compose exec mailserver doveadm fts rescan -A`
#### Further Discussion

View file

@ -11,7 +11,7 @@ This can be solved by supporting IPv6 connections all the way to the DMS contain
## Setup steps
```diff
+++ b/serv/docker-compose.yml
+++ b/serv/compose.yaml
@@ ... @@ services:
+ ipv6nat:

View file

@ -2,7 +2,7 @@
title: 'Advanced | Email Gathering with Fetchmail'
---
To enable the [fetchmail][fetchmail-website] service to retrieve e-mails set the environment variable `ENABLE_FETCHMAIL` to `1`. Your `docker-compose.yml` file should look like following snippet:
To enable the [fetchmail][fetchmail-website] service to retrieve e-mails set the environment variable `ENABLE_FETCHMAIL` to `1`. Your `compose.yaml` file should look like following snippet:
```yaml
environment:
@ -18,7 +18,7 @@ Generate a file called `fetchmail.cf` and place it in the `docker-data/dms/confi
│   ├── fetchmail.cf
│   ├── postfix-accounts.cf
│   └── postfix-virtual.cf
├── docker-compose.yml
├── compose.yaml
└── README.md
```

View file

@ -85,7 +85,7 @@ The [Manage Sieve](https://doc.dovecot.org/admin_manual/pigeonhole_managesieve_s
!!! example
```yaml
# docker-compose.yml
# compose.yaml
ports:
- "4190:4190"
environment:

View file

@ -8,7 +8,7 @@ Docker images are handy but it can become a hassle to keep them updated. Also wh
One could setup a complex action/hook-based workflow using probes, but there is a nice, easy to use docker image that solves this issue and could prove useful: [`watchtower`](https://hub.docker.com/r/containrrr/watchtower).
A docker-compose example:
A Docker Compose example:
```yaml
services:
@ -25,7 +25,7 @@ For more details, see the [manual](https://containrrr.github.io/watchtower/)
When you are pulling new images in automatically, it would be nice to have them cleaned up as well. There is also a docker image for this: [`spotify/docker-gc`](https://hub.docker.com/r/spotify/docker-gc/).
A docker-compose example:
A Docker Compose example:
```yaml
services:

View file

@ -14,7 +14,7 @@ Your DMS folder structure should look like this example:
│ ├── dovecot.cf
│ ├── postfix-accounts.cf
│ └── postfix-virtual.cf
├── docker-compose.yml
├── compose.yaml
└── README.md
```

View file

@ -23,7 +23,7 @@ Podman is a daemonless container engine for developing, managing, and running OC
While using Podman, you can just manage docker-mailserver as what you did with Docker. Your best friend `setup.sh` includes the minimum code in order to support Podman since it's 100% compatible with the Docker CLI.
The installation is basically the same. Podman v3.2 introduced a RESTful API that is 100% compatible with the Docker API, so you can use docker-compose with Podman easily. Install Podman and docker-compose with your package manager first.
The installation is basically the same. Podman v3.2 introduced a RESTful API that is 100% compatible with the Docker API, so you can use Docker Compose with Podman easily. Install Podman and Docker Compose with your package manager first.
```bash
sudo dnf install podman docker-compose
@ -39,8 +39,8 @@ This will create a unix socket locate under `/run/podman/podman.sock`, which is
```bash
export DOCKER_HOST="unix:///run/podman/podman.sock"
docker-compose up -d mailserver
docker-compose ps
docker compose up -d mailserver
docker compose ps
```
You should see that docker-mailserver is running now.
@ -75,7 +75,7 @@ First, enable `podman.socket` in systemd's userspace with a non-root user.
systemctl enable --now --user podman.socket
```
The socket file should be located at `/var/run/user/$(id -u)/podman/podman.sock`. Then, modify `docker-compose.yml` to make sure all ports are bindings are on non-privileged ports.
The socket file should be located at `/var/run/user/$(id -u)/podman/podman.sock`. Then, modify `compose.yaml` to make sure all ports are bindings are on non-privileged ports.
```yaml
services:
@ -88,12 +88,12 @@ services:
- "10993:993" # IMAP4 (implicit TLS)
```
Then, setup your `mailserver.env` file follow the documentation and use docker-compose to start the container.
Then, setup your `mailserver.env` file follow the documentation and use Docker Compose to start the container.
```bash
export DOCKER_HOST="unix:///var/run/user/$(id -u)/podman/podman.sock"
docker-compose up -d mailserver
docker-compose ps
docker compose up -d mailserver
docker compose ps
```
### Security in Rootless Mode
@ -106,12 +106,12 @@ The `PERMIT_DOCKER` variable in the `mailserver.env` file allows to specify trus
#### Use the slip4netns network driver
The second workaround is slightly more complicated because the `docker-compose.yml` has to be modified.
The second workaround is slightly more complicated because the `compose.yaml` has to be modified.
As shown in the [fail2ban section](../../security/fail2ban/#podman-with-slirp4netns-port-driver) the `slirp4netns` network driver has to be enabled.
This network driver enables podman to correctly resolve IP addresses but it is not compatible with
user defined networks which might be a problem depending on your setup.
[Rootless Podman][rootless::podman] requires adding the value `slirp4netns:port_handler=slirp4netns` to the `--network` CLI option, or `network_mode` setting in your `docker-compose.yml`.
[Rootless Podman][rootless::podman] requires adding the value `slirp4netns:port_handler=slirp4netns` to the `--network` CLI option, or `network_mode` setting in your `compose.yaml`.
You must also add the ENV `NETWORK_INTERFACE=tap0`, because Podman uses a [hard-coded interface name][rootless::podman::interface] for `slirp4netns`.
@ -169,7 +169,7 @@ firewall-cmd --permanent --direct --add-rule <ipv4|ipv6> nat OUTPUT 0 -p <tcp|ud
firewall-cmd --reload
```
Just map all the privilege port with non-privilege port you set in docker-compose.yml before as root user.
Just map all the privilege port with non-privilege port you set in compose.yaml before as root user.
[rootless::podman]: https://github.com/containers/podman/blob/v3.4.1/docs/source/markdown/podman-run.1.md#--networkmode---net
[rootless::podman::interface]: https://github.com/containers/podman/blob/v3.4.1/libpod/networking_slirp4netns.go#L264