From b00217c67028d7e8331a5a58c6540b340877ba09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Sun, 24 Dec 2017 15:04:09 +0100 Subject: [PATCH] moved rsync on top of init container --- containers/zammad/docker-entrypoint.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/containers/zammad/docker-entrypoint.sh b/containers/zammad/docker-entrypoint.sh index cd4b50f..35c7d5f 100644 --- a/containers/zammad/docker-entrypoint.sh +++ b/containers/zammad/docker-entrypoint.sh @@ -21,17 +21,16 @@ function check_zammad_ready { # zammad init if [ "$1" = 'zammad-init' ]; then - rm ${ZAMMAD_READY_FILE} + # install / update zammad + rm -rf ${ZAMMAD_DIR:=?}/tmp + rsync -a --delete --exclude 'storage/fs/*' --exclude 'public/assets/images/*' ${ZAMMAD_TMP_DIR}/ ${ZAMMAD_DIR} + rsync -a ${ZAMMAD_TMP_DIR}/public/assets/images/ ${ZAMMAD_DIR}/public/assets/images until (echo > /dev/tcp/${POSTGRESQL_HOST}/5432) &> /dev/null; do echo "zammad railsserver waiting for postgresql server to be ready..." sleep 5 done - # install / update zammad - rsync -a --delete --exclude 'storage/fs/*' --exclude 'public/assets/images/*' ${ZAMMAD_TMP_DIR}/ ${ZAMMAD_DIR} - rsync -a ${ZAMMAD_TMP_DIR}/public/assets/images/ ${ZAMMAD_DIR}/public/assets/images - cd ${ZAMMAD_DIR} # configure database & cache