Currently MM requires the entire rails stack to load which means the DB needs to be online and connected. This can cause issues with certain migrations that actually require the site to be completely down.
Further, MM should include a clause that shuts down delayed job or sidekiq since that can cause issues as well.
My proposal is to modify the JT cap task for enabling maintenance mode to change the symlink in /u/apps/whatever/current to point to /u/apps/maintenance which JT will populate with a helpful index.html. Since the the webserver points directly there, it should serve index.html without a problem.
Second, it should call monit stop all which will kill DJ, sidekiq, and/or puma. We might need to call something else for passenger to restart, or maybe just touch /u/apps/whatever/current/tmp/restart.txt.
Finally, we should consider an auto-mainteance mode for deploys, although there are a lot of downsides to that.
Currently MM requires the entire rails stack to load which means the DB needs to be online and connected. This can cause issues with certain migrations that actually require the site to be completely down.
Further, MM should include a clause that shuts down delayed job or sidekiq since that can cause issues as well.
My proposal is to modify the JT cap task for enabling maintenance mode to change the symlink in /u/apps/whatever/current to point to /u/apps/maintenance which JT will populate with a helpful index.html. Since the the webserver points directly there, it should serve index.html without a problem.
Second, it should call
monit stop allwhich will kill DJ, sidekiq, and/or puma. We might need to call something else for passenger to restart, or maybe just touch /u/apps/whatever/current/tmp/restart.txt.Finally, we should consider an auto-mainteance mode for deploys, although there are a lot of downsides to that.