librelist archives

« back to archive

deploying flask app.

deploying flask app.

From:
jamal sasha
Date:
2013-03-05 @ 22:59
Hi,
 I am trying to deploy a flask app using apache config.

So my app is located at /usr/local/projects/re_attempt/app/wrangler.wsgi

And inisde /etc/apache2/sites-available/
I have new file called "app"
and the following is the contents of it


<VirtualHost *:80>

        WSGIDaemonProcess wrangler user=hduser group=apache threads=5
        WSGIScriptAlias /wrangler
/usr/local/projects/re_attempt/app/wrangler.wsgi

        <Directory /usr/local/projects/re_attempt/app>
            WSGIProcessGroup wrangler
            WSGIScriptReloading On
            WSGIApplicationGroup %{GLOBAL}
            Order deny,allow
            Allow from all
        </Directory>
    </VirtualHost>


Now when I try to do : I am getting a fail error:

    sudo a2ensite app
    Site app already enabled
    mhduser@markov:/etc/apache2/sites-available$ sudo /etc/init.d/apache2
reload
     * Reloading web server config

                                           [fail]

Re: [flask] deploying flask app.

From:
Christopher Meng
Date:
2013-03-05 @ 23:19
error.log please.

Re: [flask] deploying flask app.

From:
jamal sasha
Date:
2013-03-05 @ 23:25
So I figured out the error..
But now I am seeing this:
Internal Server Error

The server encountered an internal error and was unable to complete your
request. Either the server is overloaded or there is an error in the
application.

error log:
[Tue Mar 05 15:06:53 2013] [error] [client 127.0.0.1] ImportError: No
module named wrangler
[Tue Mar 05 15:11:28 2013] [notice] Graceful restart requested, doing
restart
[Tue Mar 05 15:11:28 2013] [notice] Apache/2.2.22 (Ubuntu)
PHP/5.4.6-1ubuntu1.1 mod_wsgi/3.4 Python/2.7.3 configured -- resuming
normal operations
[Tue Mar 05 15:14:58 2013] [notice] Graceful restart requested, doing
restart
[Tue Mar 05 15:14:58 2013] [notice] Apache/2.2.22 (Ubuntu)
PHP/5.4.6-1ubuntu1.1 mod_wsgi/3.4 Python/2.7.3 configured -- resuming
normal operations


Also, I dont want to deploy it like a "proper app" just share among few
people

This fits the bill
http://flask.pocoo.org/snippets/89/
But I am getting this error
sudo localtunnel -k ~/.ssh/id_rsa.pub 8080
   [Error] Unable to register tunnel. Perhaps service is down?

I am behind a proxy wall..
Though I have system wide setting for proxy?

Any suggestions?



On Tue, Mar 5, 2013 at 3:19 PM, Christopher Meng <cickumqt@gmail.com> wrote:

> error.log please.
>

Re: [flask] deploying flask app.

From:
Steven Kryskalla
Date:
2013-03-05 @ 23:44
On Tue, Mar 5, 2013 at 3:25 PM, jamal sasha <jamalshasha@gmail.com> wrote:
> Also, I dont want to deploy it like a "proper app" just share among few
> people
>
> This fits the bill
> http://flask.pocoo.org/snippets/89/
> But I am getting this error
> sudo localtunnel -k ~/.ssh/id_rsa.pub 8080
>    [Error] Unable to register tunnel. Perhaps service is down?
>
> I am behind a proxy wall..
> Though I have system wide setting for proxy?
>
> Any suggestions?

I don't have any experience with localtunnel, you might want to try
pagekite instead:

http://pagekite.net/

It's always worked for me, and it's written in python :)

-Steve

Re: [flask] deploying flask app.

From:
jamal sasha
Date:
2013-03-05 @ 23:51
In the sign up page it throws network error!!
I have proxy settings. how do i specify them here?


On Tue, Mar 5, 2013 at 3:44 PM, Steven Kryskalla <skryskalla@gmail.com>wrote:

> On Tue, Mar 5, 2013 at 3:25 PM, jamal sasha <jamalshasha@gmail.com> wrote:
> > Also, I dont want to deploy it like a "proper app" just share among few
> > people
> >
> > This fits the bill
> > http://flask.pocoo.org/snippets/89/
> > But I am getting this error
> > sudo localtunnel -k ~/.ssh/id_rsa.pub 8080
> >    [Error] Unable to register tunnel. Perhaps service is down?
> >
> > I am behind a proxy wall..
> > Though I have system wide setting for proxy?
> >
> > Any suggestions?
>
> I don't have any experience with localtunnel, you might want to try
> pagekite instead:
>
> http://pagekite.net/
>
> It's always worked for me, and it's written in python :)
>
> -Steve
>

Re: [flask] deploying flask app.

From:
Steven Kryskalla
Date:
2013-03-06 @ 00:23
On Tue, Mar 5, 2013 at 3:51 PM, jamal sasha <jamalshasha@gmail.com> wrote:
> In the sign up page it throws network error!!
> I have proxy settings. how do i specify them here?

Run pagekite.py --help, there are instructions on how to specify a proxy server.

Re: [flask] deploying flask app.

From:
Jose Ayerdis
Date:
2013-05-01 @ 15:18
I can now tell that openshift is a great option for MySQL + Flask
combination. It took me a couple of hour to understand how it work and
deploy my app, love it. totally worth it.

Sincerly yours,

[Jose Luis Ayerdis Espinoza]
Necronet.info |
LinkedIn<http://www.linkedin.com/pub/jose-luis-ayerdis-espinoza/28/7b4/704>|
Careers
StackOverflow <http://careers.stackoverflow.com/necronet>


2013/3/6 Steven Kryskalla <skryskalla@gmail.com>

> On Tue, Mar 5, 2013 at 3:51 PM, jamal sasha <jamalshasha@gmail.com> wrote:
> > In the sign up page it throws network error!!
> > I have proxy settings. how do i specify them here?
>
> Run pagekite.py --help, there are instructions on how to specify a proxy
> server.
>