Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix using enigma plugin #271

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ or to inject additional data into the container:
* `/var/roundcube/db`: storage location of the SQLite database
Only needed if using `ROUNDCUBEMAIL_DB_TYPE=sqlite` to persist the Roundcube database.

* `/var/roundcube/enigma`: storage location of the enigma plugin
If enabled, the "enigma" plugin stores OpenPGP keys here.

* `/tmp/roundcube-temp`: Roundcube's temp folder
Temp files like uploaded attachments or thumbnail images are stored here.
Share this directory via a volume when running multiple replicas of the roundcube container.
Expand Down
8 changes: 2 additions & 6 deletions templates/Dockerfile-alpine.templ
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ ENV ROUNDCUBEMAIL_KEYID "F3E4 C04B B3DB 5D42 15C4 5F7F 5AB2 BAA1 41C4 F7D5"

# Download package and extract to web volume
RUN set -ex; \
apk add --no-cache --virtual .fetch-deps \
gnupg \
; \
\
apk add --no-cache gnupg;
curl -o roundcubemail.tar.gz -fSL https://github.com/roundcube/roundcubemail/releases/download/${ROUNDCUBEMAIL_VERSION}/roundcubemail-${ROUNDCUBEMAIL_VERSION}-complete.tar.gz; \
curl -o roundcubemail.tar.gz.asc -fSL https://github.com/roundcube/roundcubemail/releases/download/${ROUNDCUBEMAIL_VERSION}/roundcubemail-${ROUNDCUBEMAIL_VERSION}-complete.tar.gz.asc; \
export GNUPGHOME="$(mktemp -d)"; \
Expand All @@ -106,9 +103,8 @@ RUN set -ex; \
rm -r "$GNUPGHOME" roundcubemail.tar.gz.asc roundcubemail.tar.gz; \
rm -rf /usr/src/roundcubemail/installer; \
chown -R www-data:www-data /usr/src/roundcubemail/logs; \
apk del .fetch-deps; \
# Create the config dir
mkdir -p /var/roundcube/config
mkdir -p /var/roundcube/config /var/roundcube/enigma

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["%%CMD%%"]
2 changes: 1 addition & 1 deletion templates/Dockerfile-debian.templ
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ RUN set -ex; \
rm -rf /usr/src/roundcubemail/installer; \
chown -R www-data:www-data /usr/src/roundcubemail/logs; \
# Create the config dir
mkdir -p /var/roundcube/config
mkdir -p /var/roundcube/config /var/roundcube/enigma

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["%%CMD%%"]
5 changes: 5 additions & 0 deletions templates/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ if [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
echo "\$config['spellcheck_uri'] = '${ROUNDCUBEMAIL_SPELLCHECK_URI}';" >> config/config.docker.inc.php
fi

# If the "enigma" plugin is enabled but has no storage configured, inject a default value for the mandatory setting.
if $(echo $ROUNDCUBEMAIL_PLUGINS | grep -Eq '\benigma\b') && ! grep -qr enigma_pgp_homedir /var/roundcube/config/; then
echo "$config['enigma_pgp_homedir'] = '/var/roundcube/enigma';" >> config/config.docker.inc.php
pabzm marked this conversation as resolved.
Show resolved Hide resolved
pabzm marked this conversation as resolved.
Show resolved Hide resolved
fi

# include custom config files
for fn in `ls /var/roundcube/config/*.php 2>/dev/null || true`; do
echo "include('$fn');" >> config/config.docker.inc.php
Expand Down
Loading