diff --git a/abra.sh b/abra.sh index 37a8658..11a0a3e 100644 --- a/abra.sh +++ b/abra.sh @@ -1 +1,2 @@ -export ABRA_MATTERMOST_ENTRYPOINT_VERSION=v1 +export ABRA_MATTERMOST_ENTRYPOINT_VERSION=v2 +export BUSYBOX_VERSION=v1 diff --git a/busybox b/busybox new file mode 100755 index 0000000..5c5d611 Binary files /dev/null and b/busybox differ diff --git a/compose.yml b/compose.yml index 7e4e5c5..4c71313 100644 --- a/compose.yml +++ b/compose.yml @@ -2,7 +2,7 @@ version: "3.8" services: app: - image: mattermost/mattermost-team-edition:10.5.14 + image: mattermost/mattermost-team-edition:10.11.6 environment: - TZ - MM_SQLSETTINGS_DRIVERNAME=postgres @@ -28,13 +28,16 @@ services: - "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect" - "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true" - "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}" - - "coop-cloud.${STACK_NAME}.version=2.0.7+10.5.14" + - "coop-cloud.${STACK_NAME}.version=2.1.0+10.11.6" - "backupbot.backup=true" - "backupbot.backup.path=/mattermost,/etc/ssl" configs: - source: abra_mattermost_entrypoint target: /abra-mattermost-entrypoint.sh mode: 0555 + - source: busybox + target: /bin/busybox + mode: 0555 secrets: - postgres_password entrypoint: /abra-mattermost-entrypoint.sh @@ -69,6 +72,9 @@ configs: abra_mattermost_entrypoint: name: ${STACK_NAME}_entrypoint_${ABRA_MATTERMOST_ENTRYPOINT_VERSION} file: ./entrypoint.sh + busybox: + name: ${STACK_NAME}_busybox_${BUSYBOX_VERSION} + file: ./busybox networks: proxy: diff --git a/entrypoint.sh b/entrypoint.sh old mode 100644 new mode 100755 index 9ca2f50..64ae69e --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/busybox sh set -e if test -f "/run/secrets/postgres_password"; then - pwd=`cat /run/secrets/postgres_password` + pwd=`/bin/busybox cat /run/secrets/postgres_password` if [ -z $pwd ]; then echo >&2 "error: /run/secrets/postgres_password is empty" exit 1 @@ -16,4 +16,4 @@ else fi # https://github.com/mattermost/mattermost-server/blob/master/build/Dockerfile -/entrypoint.sh "mattermost" +/mattermost/bin/mattermost diff --git a/release/2.1.0+10.11.6 b/release/2.1.0+10.11.6 new file mode 100644 index 0000000..ef550de --- /dev/null +++ b/release/2.1.0+10.11.6 @@ -0,0 +1,5 @@ +the docker containers in 10.11 branch don't contain any unix programs. That +means there's no sh or bash, no cat etc etc. We need to have a shell to run +our entrypoint and export the postgres URL as an env variable. To overcome +this we insert a busybox binary as a config into the container. There's no +action required on the side of the operator but it's important to note.