Maintenance mode page is the user-friendly message for your site visitors indicating that we are working on something for which the site needs to be down for some time. We require this because we don't want our website to be broken for a specific amount of time while the site maintenance is in progress.
- Performing upgrades (migrate rails version from one to another)
- Performing data migrations in the backend
- Migrating images or files from Amazon S3 to Google Cloud or vice versa
- And many more...
Turnout gem has the following features.
- Easy installation
- Rake commands to turn maintenance mode on and off
- Easily provide a reason for each downtime without editing the maintenance.html file
- Allow certain IPs or IP ranges to bypass the maintenance page
- Allow certain paths to be accessible during maintenance
You can find them all of them here.
Just add the following gem to your Gemfile
bundle install that's it!
$ rake maintenance: start.
Tada! It's done. When you do so, you will get the following page.
$ rake maintenance: start reason= "This is the custom reason!"
You can find all the commands here.
$ rake maintenance: end.
Default maintenance pages are provided, but you can create your own
public/maintenance.[html|json|html.erb] files instead.
That's it! Please try it in your ruby on rails application too.
Most people want to make things perfect. Sometimes we evaluate the complexity of an upcoming goal or a problem. So, the fear to not complete it perfectly or "wrong" (Yeah, who are judges? 🤔) stops us even from trying.