From 615613bd66a102fe9b4909fda6f15fd48b505d7a Mon Sep 17 00:00:00 2001 From: missytake Date: Thu, 13 Nov 2025 21:22:31 +0100 Subject: [PATCH] Suggestions from @Keonik1 Co-authored-by: Keonik <57857901+Keonik1@users.noreply.github.com> --- docker/files/setup_chatmail_docker.sh | 10 +++++----- docs/DOCKER_INSTALLATION_EN.md | 4 ++++ docs/DOCKER_INSTALLATION_RU.md | 5 ++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docker/files/setup_chatmail_docker.sh b/docker/files/setup_chatmail_docker.sh index e22b6c7f..c5daff34 100755 --- a/docker/files/setup_chatmail_docker.sh +++ b/docker/files/setup_chatmail_docker.sh @@ -47,11 +47,11 @@ monitor_certificates() { ### MAIN -if [ "$DEBUG_COMMANDS_ENABLED" == "true" ]; then +if [ "$DEBUG_COMMANDS_ENABLED" = true ]; then debug_commands fi -if [ "$FORCE_REINIT_INI_FILE" == "true" ]; then +if [ "$FORCE_REINIT_INI_FILE" = true ]; then INI_CMD_ARGS=--force fi @@ -61,15 +61,15 @@ chown opendkim:opendkim /etc/dkimkeys/opendkim.txt # TODO: Move to debug_commands after git clone is moved to dockerfile. git config --global --add safe.directory /opt/chatmail -if [ "$RECREATE_VENV" == "true" ]; then +if [ "$RECREATE_VENV" = true ]; then rm -rf venv fi ./scripts/initenv.sh -./scripts/cmdeploy init --config "${INI_FILE}" $INI_CMD_ARGS $MAIL_DOMAIN +./scripts/cmdeploy init --config "${INI_FILE}" $INI_CMD_ARGS $MAIL_DOMAIN || true bash /update_ini.sh -./scripts/cmdeploy run --ssh-host docker +./scripts/cmdeploy run --ssh-host @docker echo "ForwardToConsole=yes" >> /etc/systemd/journald.conf systemctl restart systemd-journald diff --git a/docs/DOCKER_INSTALLATION_EN.md b/docs/DOCKER_INSTALLATION_EN.md index 7a66e456..8e61256d 100644 --- a/docs/DOCKER_INSTALLATION_EN.md +++ b/docs/DOCKER_INSTALLATION_EN.md @@ -38,7 +38,11 @@ Please substitute it with your own domain. ```shell cp ./docker/docker-compose-default.yaml docker-compose.yaml ``` +2. Copy `./docker/example.env` and rename it to `.env`. This file stores variables used in `docker-compose.yaml`. +```shell +cp ./docker/example.env .env +```\ 3. Configure environment variables in the `.env` file. These variables are used in the `docker-compose.yaml` file to pass repeated values. 4. Configure kernel parameters because they cannot be changed inside the container, specifically `fs.inotify.max_user_instances` and `fs.inotify.max_user_watches`. Run the following: diff --git a/docs/DOCKER_INSTALLATION_RU.md b/docs/DOCKER_INSTALLATION_RU.md index e90cf889..6c7409cf 100644 --- a/docs/DOCKER_INSTALLATION_RU.md +++ b/docs/DOCKER_INSTALLATION_RU.md @@ -34,7 +34,10 @@ Please substitute it with your own domain. ```shell cp ./docker/docker-compose-default.yaml docker-compose.yaml ``` - +2. Скопировать `./docker/example.env` и переименовать в `.env`. Здесь хранятся переменные, которые используются в `docker-compose.yaml`. +```shell +cp ./docker/example.env .env +```\ 3. Настроить переменные окружения в `.env` файле. Эти переменные используются в `docker-compose.yaml` файле, чтобы передавать повторяющиеся значения. 4. Настроить параметры ядра, потому что внутри контейнера их нельзя изменить, а конкретно `fs.inotify.max_user_instances` и `fs.inotify.max_user_watches`. Для этого выполнить следующее: