Compare commits

..

1 Commits

5 changed files with 9 additions and 21 deletions

View File

@ -1,2 +1 @@
export ABRA_MATTERMOST_ENTRYPOINT_VERSION=v2
export BUSYBOX_VERSION=v1
export ENTRYPOINT_VERSION=v1

BIN
busybox

Binary file not shown.

View File

@ -2,7 +2,7 @@ version: "3.8"
services:
app:
image: mattermost/mattermost-team-edition:10.11.7
image: mattermost/mattermost-team-edition:10.5.10
environment:
- TZ
- MM_SQLSETTINGS_DRIVERNAME=postgres
@ -26,18 +26,15 @@ services:
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "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.1.1+10.11.7"
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.${STACK_NAME}-redirect.redirectscheme.permanent=true"
- "coop-cloud.${STACK_NAME}.version=2.0.4+10.5.10"
- "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
@ -70,11 +67,8 @@ secrets:
configs:
abra_mattermost_entrypoint:
name: ${STACK_NAME}_entrypoint_${ABRA_MATTERMOST_ENTRYPOINT_VERSION}
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: ./entrypoint.sh
busybox:
name: ${STACK_NAME}_busybox_${BUSYBOX_VERSION}
file: ./busybox
networks:
proxy:

6
entrypoint.sh Executable file → Normal file
View File

@ -1,7 +1,7 @@
#!/bin/busybox sh
#!/bin/sh
set -e
if test -f "/run/secrets/postgres_password"; then
pwd=`/bin/busybox cat /run/secrets/postgres_password`
pwd=`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
/mattermost/bin/mattermost
/entrypoint.sh "mattermost"

View File

@ -1,5 +0,0 @@
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.