librelist archives

« back to archive

Simple method for Maintenance mode?

Simple method for Maintenance mode?

From:
Anthony Ford
Date:
2012-07-25 @ 16:33
Hey all,

I'm trying to figure out a simple method for switching to a maintenance
mode that will redirect to a static "Site is down" type page.

I'm using Flask 0.8 behind an Apache/Mod_WSGI server, and would welcome any
hints, tips, or solutions.

Thanks,

Anthony Ford,
KF5IBN,
Research Assistant,
Center for Advanced Radio Astronomy,
University of Texas at Brownsville
ford.anthonyj@gmail.com

Re: [flask] Simple method for Maintenance mode?

From:
Kyle Jones
Date:
2012-07-25 @ 16:39
I think a pretty common way is just to swap out your Apache config (and
restart) to point to a static site for all urls, then switch back to the
WSGI config when downtime is over.

- Kyle

On Wed, Jul 25, 2012 at 9:33 AM, Anthony Ford <ford.anthonyj@gmail.com>wrote:

> Hey all,
>
> I'm trying to figure out a simple method for switching to a maintenance
> mode that will redirect to a static "Site is down" type page.
>
> I'm using Flask 0.8 behind an Apache/Mod_WSGI server, and would welcome
> any hints, tips, or solutions.
>
> Thanks,
>
> Anthony Ford,
> KF5IBN,
> Research Assistant,
> Center for Advanced Radio Astronomy,
> University of Texas at Brownsville
> ford.anthonyj@gmail.com
>
>

Re: [flask] Simple method for Maintenance mode?

From:
Anthony Ford
Date:
2012-07-25 @ 17:00
That's what I was thinking. Glad to know it's not unusual or avoided for
some reason.

Thanks,
Anthony Ford,
KF5IBN,
Research Assistant,
Center for Advanced Radio Astronomy,
University of Texas at Brownsville
ford.anthonyj@gmail.com



On Wed, Jul 25, 2012 at 12:39 PM, Kyle Jones <kyle@bucebuce.com> wrote:

> I think a pretty common way is just to swap out your Apache config (and
> restart) to point to a static site for all urls, then switch back to the
> WSGI config when downtime is over.
>
> - Kyle
>
>
> On Wed, Jul 25, 2012 at 9:33 AM, Anthony Ford <ford.anthonyj@gmail.com>wrote:
>
>> Hey all,
>>
>> I'm trying to figure out a simple method for switching to a maintenance
>> mode that will redirect to a static "Site is down" type page.
>>
>> I'm using Flask 0.8 behind an Apache/Mod_WSGI server, and would welcome
>> any hints, tips, or solutions.
>>
>> Thanks,
>>
>> Anthony Ford,
>> KF5IBN,
>> Research Assistant,
>> Center for Advanced Radio Astronomy,
>> University of Texas at Brownsville
>> ford.anthonyj@gmail.com
>>
>>
>

Re: [flask] Simple method for Maintenance mode?

From:
Darren Worrall
Date:
2012-07-26 @ 07:55
On 25 July 2012 18:00, Anthony Ford <ford.anthonyj@gmail.com> wrote:
> That's what I was thinking. Glad to know it's not unusual or avoided for
> some reason.
>
> Thanks,
> Anthony Ford,
> KF5IBN,
> Research Assistant,
> Center for Advanced Radio Astronomy,
> University of Texas at Brownsville
> ford.anthonyj@gmail.com
>
>
>
> On Wed, Jul 25, 2012 at 12:39 PM, Kyle Jones <kyle@bucebuce.com> wrote:
>>
>> I think a pretty common way is just to swap out your Apache config (and
>> restart) to point to a static site for all urls, then switch back to the
>> WSGI config when downtime is over.
>>
>> - Kyle
>>
>>
>> On Wed, Jul 25, 2012 at 9:33 AM, Anthony Ford <ford.anthonyj@gmail.com>
>> wrote:
>>>
>>> Hey all,
>>>
>>> I'm trying to figure out a simple method for switching to a maintenance
>>> mode that will redirect to a static "Site is down" type page.
>>>
>>> I'm using Flask 0.8 behind an Apache/Mod_WSGI server, and would welcome
>>> any hints, tips, or solutions.
>>>
>>> Thanks,
>>>
>>> Anthony Ford,
>>> KF5IBN,
>>> Research Assistant,
>>> Center for Advanced Radio Astronomy,
>>> University of Texas at Brownsville
>>> ford.anthonyj@gmail.com
>>>
>>
>

You could do it with a before_request function as well if you dont
want to, or cant work at the web server layer:

https://gist.github.com/3180841

--
Darren @ iWeb