feat: bump mailserver to 10.4.0 (#11)
continuous-integration/drone/push Build is passing Details

Co-authored-by: Davide Polonio <poloniodavide@gmail.com>
Reviewed-on: #11
Co-authored-by: polpetta <polpetta@poldebra.me>
Co-committed-by: polpetta <polpetta@poldebra.me>
pull/12/head
Davide Polonio 2022-02-03 21:43:17 +00:00
parent 7e7e1780b2
commit fe1526cc97
2 changed files with 17 additions and 5 deletions

View File

@ -2,7 +2,7 @@
version: '3.7'
services:
mail:
image: mailserver/docker-mailserver:10.2.0
image: mailserver/docker-mailserver:10.4.0
hostname: ${HOSTNAME}
domainname: ${DOMAINNAME}
container_name: ${CONTAINER_NAME}
@ -39,7 +39,7 @@ services:
- internal
roundcube:
image: roundcube/roundcubemail:1.4.11-apache
image: roundcube/roundcubemail:1.4.12-apache
restart: always
depends_on:
- mail

View File

@ -12,6 +12,7 @@ DESIRED_CONFIG_PATH=
DIR="$(pwd)"
DMS_CONFIG='/tmp/docker-mailserver'
IMAGE_NAME=
DEFAULT_IMAGE_NAME='docker.io/mailserver/docker-mailserver:latest'
INFO=
PODMAN_ROOTLESS=false
USE_SELINUX=
@ -25,6 +26,7 @@ LBLUE="\e[94m"
RESET="\e[0m"
set -euEo pipefail
shopt -s inherit_errexit
trap '__err "${BASH_SOURCE}" "${FUNCNAME[0]:-?}" "${BASH_COMMAND:-?}" "${LINENO:-?}" "${?:-?}"' ERR
function __err
@ -49,7 +51,7 @@ function _show_local_usage
${LBLUE}Config path, container or image adjustments${RESET}
-i IMAGE_NAME
Provides the name of the 'docker-mailserver' image. The default value is
'${WHITE}docker.io/mailserver/docker-mailserver:latest${RESET}'
'${WHITE}${DEFAULT_IMAGE_NAME}${RESET}'
-c CONTAINER_NAME
Provides the name of the running container.
@ -102,8 +104,17 @@ function _get_absolute_script_directory
DIR="$(realpath -e -L "${0}")"
DIR="${DIR%/setup.sh}"
fi
}
function _set_default_config_path
{
if [[ -d "${DIR}/config" ]]
then
# legacy path (pre v10.2.0)
DEFAULT_CONFIG_PATH="${DIR}/config"
else
DEFAULT_CONFIG_PATH="${DIR}/docker-data/dms/config"
fi
}
function _handle_config_path
@ -149,6 +160,7 @@ function _run_in_new_container
function _main
{
_get_absolute_script_directory
_set_default_config_path
local OPTIND
while getopts ":c:i:p:zZR" OPT
@ -205,7 +217,7 @@ function _main
[[ -z ${IMAGE_NAME} ]] && IMAGE_NAME=${INFO%;*}
if [[ -z ${IMAGE_NAME} ]]
then
IMAGE_NAME=${NAME:-docker.io/mailserver/docker-mailserver:latest}
IMAGE_NAME=${NAME:-${DEFAULT_IMAGE_NAME}}
fi
if test -t 0