From d5329fadc0613dbb4507f7b610dc34a50e6e410f Mon Sep 17 00:00:00 2001 From: Keonik1 Date: Sun, 24 Aug 2025 16:14:45 +0300 Subject: [PATCH] Fix issue with acmetool - https://github.com/chatmail/relay/pull/614#discussion_r2279630626 --- docker/docker-compose-default.yaml | 1 - docker/files/entrypoint.sh | 2 ++ docs/DOCKER_INSTALLATION_EN.md | 1 - docs/DOCKER_INSTALLATION_RU.md | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docker/docker-compose-default.yaml b/docker/docker-compose-default.yaml index 104c2bfa..224ac938 100644 --- a/docker/docker-compose-default.yaml +++ b/docker/docker-compose-default.yaml @@ -43,7 +43,6 @@ services: ## system - /sys/fs/cgroup:/sys/fs/cgroup:rw # required for systemd - ./:/opt/chatmail - - ./data/acme:/var/lib/acme ## data - ./data/chatmail:/home diff --git a/docker/files/entrypoint.sh b/docker/files/entrypoint.sh index 1f2ea370..76d5d408 100755 --- a/docker/files/entrypoint.sh +++ b/docker/files/entrypoint.sh @@ -1,6 +1,8 @@ #!/bin/bash set -eo pipefail +unlink /etc/nginx/sites-enabled/default + if [ "${USE_FOREIGN_CERT_MANAGER,,}" == "true" ]; then if [ ! -f "$PATH_TO_SSL/fullchain" ]; then echo "Error: file '$PATH_TO_SSL/fullchain' does not exist. Exiting..." > /dev/stderr diff --git a/docs/DOCKER_INSTALLATION_EN.md b/docs/DOCKER_INSTALLATION_EN.md index d233beba..039aead3 100644 --- a/docs/DOCKER_INSTALLATION_EN.md +++ b/docs/DOCKER_INSTALLATION_EN.md @@ -1,6 +1,5 @@ # Known issues and limitations -- Installation using acmetool (`docker-compose-default.yaml`) may NOT work. In this case, use installation via traefik (`docker-compose-traefik.yaml`). Personally, during my tests, I encountered the error `could not install DNS challenge, no hooks succeeded;`, which I was unable to fix. - Chatmail will be reinstalled every time the container is started (longer the first time, faster on subsequent starts). This is how the original installer works because it wasn’t designed for Docker. At the end of the documentation, there’s a [proposed solution](#locking-the-chatmail-version). - Requires cgroups v2 configured in the system. Operation with cgroups v1 has not been tested. - Yes, of course, using systemd inside a container is a hack, and it would be better to split it into several services, but since this is an MVP, it turned out to be easier to do it this way initially than to rewrite the entire deployment system. diff --git a/docs/DOCKER_INSTALLATION_RU.md b/docs/DOCKER_INSTALLATION_RU.md index 48939bcd..31bd814d 100644 --- a/docs/DOCKER_INSTALLATION_RU.md +++ b/docs/DOCKER_INSTALLATION_RU.md @@ -1,5 +1,4 @@ # Известные проблемы и ограничения -- Установка с помощью acmetool (`docker-compose-default.yaml`) может НЕ работать. В таком случае используйте установку через traefik (`docker-compose-traefik.yaml`). Лично у меня при тестах ошибка была `could not install DNS challenge, no hooks succeeded;`, которую исправить не удалось. - Chatmail будет переустановлен при каждом запуске контейнера (при первом - долго, при последующих быстрее). Так устроен изначальный установщик, потому что он не был заточен под docker. В конце документации [представлено](#фиксирование-версии-chatmail) возможное решение - Требуется настроенный в системе cgroups v2. Работа с cgroups v1 не тестировалась. - Да, понятно дело что systemd использовать в контейнере костыль и надо это всё разнести на несколько сервисов, но это MVP и в первом приближении оказалось сделать проще так, чем переписывать всю систему развертывания.