1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-18 18:07:22 +01:00

Fully working docker!

This commit is contained in:
Morteza Milani
2015-01-24 13:59:16 +03:30
committed by Joshua Tauberer
parent dd5de8acf3
commit a5ffd6d25e
21 changed files with 207 additions and 60 deletions

View File

@@ -37,6 +37,7 @@ function apt_get_quiet {
}
function apt_install {
if [ ! "$IS_DOCKER" ];then
# Report any packages already installed.
PACKAGES=$@
TO_INSTALL=""
@@ -163,20 +164,6 @@ function restart_service {
if [ ! "$IS_DOCKER" ]; then
# The normal way to restart a service.
hide_output service $1 restart
else
# On docker, sysvinit is not present. Our base image provides
# a weird way to manage running services. But we're not going
# to use it. Just execute the init.d script directly.
if [ "$1" == "dovecot" ]; then
# Dovecot does not provide an init.d script. It just provides
# an upstart init configuration. But Docker doesn't provide
# upstart. Start Dovecot specially.
killall dovecot
dovecot -c /etc/dovecot/dovecot.conf
else
hide_output /etc/init.d/$1 restart
fi
fi
}

View File

@@ -114,7 +114,7 @@ fi
if [ ! -d $STORAGE_ROOT ]; then
mkdir -p $STORAGE_ROOT
echo $(setup/migrate.py --current) > $STORAGE_ROOT/mailinabox.version
chown $STORAGE_USER.$STORAGE_USER $STORAGE_ROOT/mailinabox.version
chown $STORAGE_USER:$STORAGE_USER $STORAGE_ROOT/mailinabox.version
fi
@@ -183,3 +183,4 @@ openssl x509 -in $STORAGE_ROOT/ssl/ssl_certificate.pem -noout -fingerprint \
echo
echo Then you can confirm the security exception and continue.
echo

View File

@@ -89,7 +89,7 @@ EOF
# Create writable directories.
mkdir -p /var/log/roundcubemail /tmp/roundcubemail $STORAGE_ROOT/mail/roundcube
chown -R www-data.www-data /var/log/roundcubemail /tmp/roundcubemail $STORAGE_ROOT/mail/roundcube
chown -R www-data:www-data /var/log/roundcubemail /tmp/roundcubemail $STORAGE_ROOT/mail/roundcube
# Password changing plugin settings
# The config comes empty by default, so we need the settings
@@ -110,9 +110,9 @@ usermod -a -G dovecot www-data
# set permissions so that PHP can use users.sqlite
# could use dovecot instead of www-data, but not sure it matters
chown root.www-data $STORAGE_ROOT/mail
chown root:www-data $STORAGE_ROOT/mail
chmod 775 $STORAGE_ROOT/mail
chown root.www-data $STORAGE_ROOT/mail/users.sqlite
chown root:www-data $STORAGE_ROOT/mail/users.sqlite
chmod 664 $STORAGE_ROOT/mail/users.sqlite
# Enable PHP modules.