This add-on is operated by Wrenchmode
A beautiful "Down For Maintenance" page for your app in under 5 minutes.
Wrenchmode
Last updated July 28, 2023
This article is a work in progress, or documents a feature that is not yet released to all users. This article is unlisted. Only those with the link can access it.
The Wrenchmode add-on is currently in beta.
Table of Contents
WrenchMode is a fast and easy way to create a custom maintenance page for your web application. In less than 5 minutes you can have a great looking maintenance page for your application. Keep your users informed with real time updates, and when your maintenance is complete, all your waiting users are directed back to your application.
Provisioning the add-on
WrenchMode can be attached to a Heroku application via the CLI:
$ heroku addons:create wrenchmode
Using with Ruby
For your Ruby/Rack project you will start by including the wrenchmode-rack
gem.
# In your Gemfile
gem 'wrenchmode-rack'
Finally, make sure to include the middleware layer in your application.
# For Ruby on Rails, add this to /config/environments/production.rb
config.middleware.insert_before 0, Wrenchmode::Rack
# For a Rack application, add this to your-rack-app.rb
require 'rubygems'
require 'bundler/setup'
Bundler.require(:default)
use Wrenchmode::Rack
Once everything is installed, you can go to your Heroku Dashboard and click on the WrenchMode link to log into your Wrenchmode dashboard. From there you can turn Wrenchmode on and off for your project.
Using with NodeJS/Express
For your javascript project, start by installing the npm package.
$ npm install wrenchmode-express
Finally, add WrenchMode to your app.js file.
// In your app.js
var express = require('express');
var app = express();
var wrenchmodeExpress = require('wrenchmode-express');
app.use(wrenchmodeExpress());
Optional Configuration
You can change these settings if necessary, but it’s not recommended
When instantiating the middleware, you can set the following options:
Option | Usage | Default |
---|---|---|
Force Open | Set to true to force the middleware layer to allow all requests through, regardless of project status on Wrenchmode.com. Effectively disables the middleware. | false |
Ignore Test Mode | (Coming soon…) Set to false to if you want the middleware to respond to a project that is in Test mode on Wrenchmode.com This can be useful if you want to test Wrenchmode in a development or staging environment prior to deploying to production. | true |
Disable Local Wrench | (Coming soon…) Set to true if you want to disable LocalWrench mode, where the Wrenchmode page is served on your domain. Disabling it will instead force a redirect to the Wrenchmode.com domain. Note: Unless you explicitly want this behavior, it’s best to leave this at the default. | true |
Check Delay (Seconds) | Change this to modify the rate at which the middleware polls Wrenchmode for updates. Unlikely that this needs anything faster than the default. | 5 |
use Wrenchmode::Rack,
jwt: "your-really-long-jwt",
force_open: false,
ignore_test_mode: true,
disable_local_wrench: false,
check_delay_secs: 5
Dashboard
The WrenchMode dashboard allows you to:
- Turn WrenchMode ON/ OFF
- Push live updates to users when WrenchMode is on
- Check your app connection and WM status
- Style your maintenance page
The dashboard can be accessed via the CLI:
$ heroku addons:open wrenchmode
or by visiting the Heroku Dashboard and selecting Wrenchmode from the list.
Removing the add-on
WrenchMode can be removed via the CLI.
This will destroy all associated data and cannot be undone!
$ heroku addons:destroy wrenchmmode
Support
All WrenchMode support and runtime issues should be submitted via one of the Heroku Support channels. Any non-support related issues or product feedback is welcome at help@wrenchmode.com.