From 72ae869eab92a6d05a3b899e815decf4a489cd66 Mon Sep 17 00:00:00 2001 From: Keonik1 Date: Sat, 23 Aug 2025 18:16:33 +0300 Subject: [PATCH] pass values to `MAIL_DOMAIN` and `ACME_EMAIL` from vars for docker-compose-default https://github.com/chatmail/relay/pull/614#discussion_r2279591922 --- docker/docker-compose-default.yaml | 4 ++-- docs/DOCKER_INSTALLATION_EN.md | 8 ++++---- docs/DOCKER_INSTALLATION_RU.md | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docker/docker-compose-default.yaml b/docker/docker-compose-default.yaml index 9b145d6a..05211277 100644 --- a/docker/docker-compose-default.yaml +++ b/docker/docker-compose-default.yaml @@ -20,8 +20,8 @@ services: max-size: "10m" max-file: "3" environment: - MAIL_DOMAIN: - ACME_EMAIL: + MAIL_DOMAIN: $MAIL_DOMAIN + ACME_EMAIL: $ACME_EMAIL # RECREATE_VENV: "false" # MAX_MESSAGE_SIZE: "50M" # DEBUG_COMMANDS_ENABLED: "true" diff --git a/docs/DOCKER_INSTALLATION_EN.md b/docs/DOCKER_INSTALLATION_EN.md index ab2ef97e..92354739 100644 --- a/docs/DOCKER_INSTALLATION_EN.md +++ b/docs/DOCKER_INSTALLATION_EN.md @@ -39,7 +39,9 @@ Please substitute it with your own domain. cp ./docker/docker-compose-default.yaml docker-compose.yaml ``` -3. 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: +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: ```shell echo "fs.inotify.max_user_instances=65536" | sudo tee -a /etc/sysctl.d/99-inotify.conf @@ -47,7 +49,7 @@ echo "fs.inotify.max_user_watches=65536" | sudo tee -a /etc/sysctl.d/99-inotify. sudo sysctl --system ``` -4. Configure container environment variables. Below is the list of variables used during deployment: +5. Configure container environment variables. Below is the list of variables used during deployment: - `MAIL_DOMAIN` – The domain name of the future server. (required) - `DEBUG_COMMANDS_ENABLED` – Run debug commands before installation. (default: `false`) @@ -65,8 +67,6 @@ Mandatory variables for deployment via Docker: - `CHANGE_KERNEL_SETTINGS` – Change kernel settings (`fs.inotify.max_user_instances` and `fs.inotify.max_user_watches`) on startup. Changing kernel settings inside the container is not possible! (default: `False`) -5. Configure environment variables in the `.env` file. These variables are used in the `docker-compose.yaml` file to pass repeated values. - 6. Build the Docker image: ```shell diff --git a/docs/DOCKER_INSTALLATION_RU.md b/docs/DOCKER_INSTALLATION_RU.md index 329ed28c..1c715fdd 100644 --- a/docs/DOCKER_INSTALLATION_RU.md +++ b/docs/DOCKER_INSTALLATION_RU.md @@ -35,14 +35,16 @@ Please substitute it with your own domain. cp ./docker/docker-compose-default.yaml docker-compose.yaml ``` -3. Настроить параметры ядра, потому что внутри контейнера их нельзя изменить, а конкретно `fs.inotify.max_user_instances` и `fs.inotify.max_user_watches`. Для этого выполнить следующее: +3. Настроить переменные окружения в `.env` файле. Эти переменные используются в `docker-compose.yaml` файле, чтобы передавать повторяющиеся значения. + +4. Настроить параметры ядра, потому что внутри контейнера их нельзя изменить, а конкретно `fs.inotify.max_user_instances` и `fs.inotify.max_user_watches`. Для этого выполнить следующее: ```shell echo "fs.inotify.max_user_instances=65536" | sudo tee -a /etc/sysctl.d/99-inotify.conf echo "fs.inotify.max_user_watches=65536" | sudo tee -a /etc/sysctl.d/99-inotify.conf sudo sysctl --system ``` -4. Настроить переменные окружения контейнера. Ниже перечислен список переменных учавствующих при развертывании. +5. Настроить переменные окружения контейнера. Ниже перечислен список переменных учавствующих при развертывании. - `MAIL_DOMAIN` - Доменное имя будущего сервера. (required) - `DEBUG_COMMANDS_ENABLED` - Выполнить debug команды перед установкой. (default: `false`) - `FORCE_REINIT_INI_FILE` - Пересоздавать ini файл конфигурации при запуске. (default: `false`) @@ -58,8 +60,6 @@ sudo sysctl --system Ниже перечислены переменные, которые обязательны быть выставлены при развертывании через docker: - `CHANGE_KERNEL_SETTINGS` - Менять настройки ядра (`fs.inotify.max_user_instances` и `fs.inotify.max_user_watches`) при запуске. При запуске в контейнере смена настроек ядра не может быть выполнена! (default: `False`) -5. Настроить переменные окружения в `.env` файле. Эти переменные используются в `docker-compose.yaml` файле, чтобы передавать повторяющиеся значения. - 6. Собрать docker образ ```shell docker compose build chatmail