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