forked from coop-cloud/mattermost
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fc265a1188 | |||
| 2f94930db2 | |||
| f2d2cf7c88 | |||
| 177d5a858f | |||
| cae3921b41 |
3
abra.sh
3
abra.sh
@ -1 +1,2 @@
|
||||
export ENTRYPOINT_VERSION=v1
|
||||
export ABRA_MATTERMOST_ENTRYPOINT_VERSION=v2
|
||||
export BUSYBOX_VERSION=v1
|
||||
|
||||
12
compose.yml
12
compose.yml
@ -2,7 +2,7 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: mattermost/mattermost-team-edition:10.5.10
|
||||
image: mattermost/mattermost-team-edition:10.11.7
|
||||
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.4+10.5.10"
|
||||
- "coop-cloud.${STACK_NAME}.version=2.1.1+10.11.7"
|
||||
- "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
|
||||
@ -67,8 +70,11 @@ secrets:
|
||||
|
||||
configs:
|
||||
abra_mattermost_entrypoint:
|
||||
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
|
||||
name: ${STACK_NAME}_entrypoint_${ABRA_MATTERMOST_ENTRYPOINT_VERSION}
|
||||
file: ./entrypoint.sh
|
||||
busybox:
|
||||
name: ${STACK_NAME}_busybox_${BUSYBOX_VERSION}
|
||||
file: ./busybox
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
|
||||
6
entrypoint.sh
Normal file → Executable file
6
entrypoint.sh
Normal file → Executable file
@ -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
|
||||
|
||||
5
release/2.1.0+10.11.6
Normal file
5
release/2.1.0+10.11.6
Normal file
@ -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.
|
||||
Reference in New Issue
Block a user