moved rsync on top of init container

This commit is contained in:
André Bauer 2017-12-24 15:04:09 +01:00
parent db984758d4
commit b00217c670

View File

@ -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