mirror of
https://github.com/zokradonh/kopano-docker
synced 2025-06-07 16:06:14 +00:00
make it possible to install additional packages at runtime and not only during build
Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
parent
2043b94062
commit
c8096b9a8f
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES:-""}
|
||||
|
||||
set -eu # unset variables are errors & non-zero return values exit the whole script
|
||||
|
||||
if [ ! -e /kopano/$SERVICE_TO_START.py ]
|
||||
@ -8,6 +10,13 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ ! -z "$ADDITIONAL_KOPANO_PACKAGES" ] && apt update
|
||||
[ ! -z "$ADDITIONAL_KOPANO_PACKAGES" ] && for installpkg in "$ADDITIONAL_KOPANO_PACKAGES"; do
|
||||
if [ $(dpkg-query -W -f='${Status}' $installpkg 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||
apt --assume-yes install $installpkg;
|
||||
fi
|
||||
done
|
||||
|
||||
mkdir -p /kopano/data/attachments /tmp/$SERVICE_TO_START /var/run/kopano
|
||||
|
||||
echo "Configure core service '$SERVICE_TO_START'" | ts
|
||||
|
@ -99,6 +99,7 @@ services:
|
||||
- ./data/socket/:/run/kopano
|
||||
environment:
|
||||
- TZ=Europe/Berlin
|
||||
#- ADDITIONAL_KOPANO_PACKAGES=kopano-webapp-plugin-mattermost
|
||||
networks:
|
||||
- web
|
||||
- kopanonet
|
||||
@ -140,6 +141,7 @@ services:
|
||||
- KCCONF_LDAP_LDAP_SEARCH_BASE=OU=MyUsers,dc=domain,dc=tld #change here
|
||||
- KCCOMMENT_LDAP_1=!include /usr/share/kopano/ldap.openldap.cfg #delete if you want openldap
|
||||
- KCUNCOMMENT_LDAP_1=!include /usr/share/kopano/ldap.active-directory.cfg #delete if you want openldap
|
||||
#- ADDITIONAL_KOPANO_PACKAGES=kopano-migration-imap
|
||||
networks:
|
||||
- kopanonet
|
||||
volumes:
|
||||
|
@ -1,11 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# define default value for serverhostname and serverport of not passed into container
|
||||
# define default value for serverhostname and serverport if not passed into container
|
||||
KCCONF_SERVERHOSTNAME=${KCCONF_SERVERHOSTNAME:-127.0.0.1}
|
||||
KCCONF_SERVERPORT=${KCCONF_SERVERPORT:-237}
|
||||
ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES:-""}
|
||||
|
||||
set -eu # unset variables are errors & non-zero return values exit the whole script
|
||||
|
||||
[ ! -z "$ADDITIONAL_KOPANO_PACKAGES" ] && apt update
|
||||
[ ! -z "$ADDITIONAL_KOPANO_PACKAGES" ] && for installpkg in "$ADDITIONAL_KOPANO_PACKAGES"; do
|
||||
if [ $(dpkg-query -W -f='${Status}' $installpkg 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||
apt --assume-yes install $installpkg;
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Ensure directories"
|
||||
mkdir -p /run/sessions /tmp/webapp
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user