[LRUG] Rendering maintenance pages?
Joel Chippindale
joel.chippindale at gmail.com
Thu Jun 27 01:14:58 PDT 2013
Thanks for your responses, however I realise I haven't been as clear as I
could have been in asking the question.
The bit that I was wondering about was finding a clean and simple way of
getting a rake task to render the maintenance page (and perhaps 500 and 404
response pages too) from erb templates to the filesystem, whilst still be
able to take advantage of asset packaging, name route helper methods etc.
J.
On 26 June 2013 16:02, Adam Carlile <adam at benchmedia.co.uk> wrote:
> If you place an index.html file in "#{Rails.root}/public" it should get
> served ahead of anything bound into rack.
>
> So you could get a rake task to generate a new index.html file from an
> existing erb template somewhere in your app.
>
> The danger is of course that if someone isn't accessing the root of your
> application, that path will still get served.
>
> The safest way is to probably use the web server to switch to a
> maintenance site at the same domain, reload it, and then run the deploy.
> linking the site back in after the deployment is complete.
>
> Adam
>
> On 26 Jun 2013, at 15:47, Joel Chippindale <joel.chippindale at gmail.com>
> wrote:
>
> > LRUG'ers can I tap into your collective wisdom?
> >
> > I have a Rails app where I would like to use templates from the app to
> render a 503 maintenance page each time I deploy, perhaps with a rake task,
> so that the page can be served statically by my web server when my app is
> down for maintenance.
> >
> > Is there a nice easy way of using Rails to do this? If not, what do you
> do?
> >
> > J.
> > _______________________________________________
> > Chat mailing list
> > Chat at lists.lrug.org
> > http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20130627/1edc4b2e/attachment-0003.html>
More information about the Chat
mailing list