roundcube fixes

This commit is contained in:
bvn13 2026-07-04 20:11:29 +03:00
parent b9b26554f5
commit 21a71eeeff
3 changed files with 28 additions and 2 deletions

View File

@ -0,0 +1,9 @@
FROM roundcube/roundcubemail:latest-apache
COPY entrypoint.sh /entrypoint-custom.sh
COPY docker-override.inc.php /docker-override.inc.php
RUN chmod +x /entrypoint-custom.sh
ENTRYPOINT ["/entrypoint-custom.sh"]
CMD ["apache2-foreground"]

View File

@ -0,0 +1,17 @@
#!/bin/bash
set -e
# Запускаем оригинальный entrypoint в фоне
/docker-entrypoint.sh "$@" &
PID=$!
# Ждём пока конфиг сгенерируется
while [ ! -f /var/www/html/config/config.inc.php ]; do
sleep 1
done
# Добавляем require_once если его ещё нет
grep -q "docker-override" /var/www/html/config/config.inc.php || \
echo "require_once '/var/www/html/config/docker-override.inc.php';" >> /var/www/html/config/config.inc.php
wait $PID

View File

@ -60,14 +60,14 @@ services:
- mail
roundcube:
image: roundcube/roundcubemail:latest-apache
build: ./config/roundcube
#image: roundcube/roundcubemail:latest-apache
container_name: roundcube
restart: unless-stopped
ports:
- "8888:80" # веб-интерфейс почты, менять при конфликте
volumes:
- ./data/roundcube:/var/roundcube/db
- ./config/roundcube/docker-override.inc.php:/var/www/html/config/docker-override.inc.php
environment:
# IMAP — подключаемся к stalwart внутри сети
ROUNDCUBEMAIL_DEFAULT_HOST: "ssl://stalwart"