Skip to content

Commit

Permalink
chore: split precheck and upgrade zealot task in docker mode
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed Sep 27, 2024
1 parent ae03d02 commit 01913e2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
14 changes: 8 additions & 6 deletions docker/rootfs/etc/cont-init.d/20-init-zealot
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ cd /app
rm -f tmp/pids/.pid
mkdir -p tmp/pids tmp/cache tmp/uploads tmp/sockets log

echo "!!!!!!!!!!!! BREAKING CHANGES !!!!!!!!!!!!"
echo "Zealot removes -> redis <- dependency, refactors backup feature completely."
echo "If you have any problems with running, please refer to: https://github.com/tryzealot/zealot/pull/1318"
echo "!!!!!!!!!!!! BREAKING CHANGES !!!!!!!!!!!!"
echo ""
echo "Zealot 6.0 is comming soon, here is some changes: "
echo " * redis is not requires as a dependency, you can remove it saftly."
echo " * NEW WEB UI desgin rewrite, feedback is welcome with any issue."
echo " * Swagger API explorer is buit-in."
echo ""

if [ -n "$REDIS_URL" ]; then
echo
case $REDIS_URL in
*redis:*|localhost:*|127.0.0.1:*)
echo "-> Detected REDIS_URL and redis service, you can remove redis service and the variable."
echo "[WARN] Detected REDIS_URL and redis service, you can remove redis service and the variable."
;;
*)
echo "-> Detected REDIS_URL variable, you can remove the variable."
echo "[WARN] Detected REDIS_URL variable, you can remove the variable."
;;
esac
fi
5 changes: 0 additions & 5 deletions docker/rootfs/etc/cont-init.d/25-upgrade-zealot

This file was deleted.

5 changes: 5 additions & 0 deletions docker/rootfs/etc/cont-init.d/30-zealot-upgrade
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/with-contenv sh

cd /app
./bin/rails zealot:upgrade
exit 0
4 changes: 4 additions & 0 deletions docker/rootfs/etc/cont-init.d/31-zealot-precheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/with-contenv sh

cd /app
./bin/rails zealot:precheck
3 changes: 2 additions & 1 deletion lib/tasks/zealot/zealot.rake
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ namespace :zealot do
fail smtp_validator.error_message
exit!
end
echo "SMTP verified successful"
else
puts "smtp is not configure, skip"
puts "SMTP is not configure, skip"
end
end
end
Expand Down

0 comments on commit 01913e2

Please sign in to comment.