24 Feb

Deployment Tip: Maintenance Page

February 24th, 2007 — 8:47 pm Dave

Slate Screenshot: Scheduled DowntimeWhile we don’t use capistrano we’re stealing a page from their book in how we deploy apps. Because we need to stop and start services when upgrading slate we have a “down for maintenance” page we put up before working on anything. This way users aren’t just left hanging when slate goes away. One of the interesting problems with slate though is the fact that users using our sites have no idea that they’re using slate. Hopefully we’ve been able to explain what’s going on properly.

So how to do this?

1. Put the following in your Apache config:

# Check for maintenance file. Let apache load it if it exists
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteRule . /system/maintenance.html [L]

2. Make sure that you put a stand-by file in %{DOCUMENT_ROOT}/system/ called maintenance1.html or something

3. Before you perform maintenance rename maintenance1.html to maintenance.html

We have step 3 automated and I’m sure you’ll want to do something similar. Cap will take care of that for you as well.

Add comment

You are adding a new comment