Running a Django site on a standalone Windows laptop

94 views
Skip to first unread message

Remco Gerlich

unread,
Feb 16, 2016, 9:37:12 AM2/16/16
to django...@googlegroups.com
Hi,

We have a web application that usually runs on Ubuntu servers on the Internet. In the background it calls software that runs on Windows servers, over a network.

For a new project, this application must run standalone on a laptop, in the field, used by not very technical users. We can make the Python/Django code Windows compatible pretty easily, but not the background software, so it will be a Windows laptop that will run everything.

What's the best way to run Django as a service under Windows? Is Apache / ModWSGI feasible?

Remco Gerlich

m1chael

unread,
Feb 16, 2016, 9:47:52 AM2/16/16
to django...@googlegroups.com
I would vote for a Virtualbox instance depending on your performance requirements

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFAGLK2KyoCgHJnXiHQAYiPo8o7FdDDEWWy_s5n2cX1_bawvOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Remco Gerlich

unread,
Feb 16, 2016, 9:59:52 AM2/16/16
to django...@googlegroups.com
We thought about that and it's certainly an option, but 1) the communication with the background tasks running on the Windows host is going to be tricky and 2) I have no experience with running it as a service.

So I'd prefer running on Windows directly.

Remco Gerlich


Avraham Serour

unread,
Feb 16, 2016, 10:24:54 AM2/16/16
to django...@googlegroups.com

I would also consider cygwin, you can even use uwsgi and nginx, you can easily add them as cygwin services which cygwin takes care to add them as windows services


Ezequiel Bertti

unread,
Feb 16, 2016, 12:40:51 PM2/16/16
to django...@googlegroups.com
You can try docker with docker toolkit.

and run this sample:





For more options, visit https://groups.google.com/d/optout.



--
Ezequiel Bertti
E-Mail: ebe...@gmail.com
Cel: (21) 99188-4860

James Schneider

unread,
Feb 16, 2016, 2:56:12 PM2/16/16
to django...@googlegroups.com
I would first try a native installation of Apache/mod_wsgi. Apache installs as a service and can easily be made available on both the laptop and other machines on the same network. Adding other complexity layers like virtualization, containers, or Cygwin (which I'm not even sure how to classify, lol) will almost certainly give you trouble with a portable server environment like you are trying to establish. Not that it isn't possible to do it with those technologies, but your level of complexity increases immensely, and the ratio of complexity layers to end-user issues is usually exponential in nature. 

Having never dealt with Django/Python on Windows myself, I'm afraid I can't speak to how well supported such a setup is (although it seems to be per the Apache/WSGI pages).

This guide seems reasonable and appears to be close to what you want.

Also happened to just stumble across this on a Googling expedition:


Good luck!

-James


Mike Dewhirst

unread,
Feb 16, 2016, 4:35:37 PM2/16/16
to django...@googlegroups.com
I agree with James. Apache and mod_wsgi is fine on Windows. There may be
some Windows-specific Apache conf tweaks but running single-user on a
laptop should be easy.

On 17/02/2016 6:55 AM, James Schneider wrote:
> On Tue, Feb 16, 2016 at 6:36 AM, Remco Gerlich <re...@gerlich.nl
> <mailto:re...@gerlich.nl>> wrote:
>
> Hi,
>
> We have a web application that usually runs on Ubuntu servers on the
> Internet. In the background it calls software that runs on Windows
> servers, over a network.
>
> For a new project, this application must run standalone on a laptop,
> in the field, used by not very technical users. We can make the
> Python/Django code Windows compatible pretty easily, but not the
> background software, so it will be a Windows laptop that will run
> everything.
>
> What's the best way to run Django as a service under Windows? Is
> Apache / ModWSGI feasible?
>
>
> I would first try a native installation of Apache/mod_wsgi. Apache
> installs as a service and can easily be made available on both the
> laptop and other machines on the same network. Adding other complexity
> layers like virtualization, containers, or Cygwin (which I'm not even
> sure how to classify, lol) will almost certainly give you trouble with a
> portable server environment like you are trying to establish. Not that
> it isn't possible to do it with those technologies, but your level of
> complexity increases immensely, and the ratio of complexity layers to
> end-user issues is usually exponential in nature.Â
>
> Having never dealt with Django/Python on Windows myself, I'm afraid I
> can't speak to how well supported such a setup is (although it seems to
> be per the Apache/WSGI pages).
>
> This guide seems reasonable and appears to be close to what you want.
> https://frepple.com/docs/2.2/installation-guide/windows-apache.html
>
> Also happened to just stumble across this on a Googling expedition:
>
> https://code.djangoproject.com/wiki/WindowsInstall
>
> Good luck!
>
> -James
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXsZw5-CqL4px93vUM8LAofKATeFSLcmov3fKNesnE0bw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXsZw5-CqL4px93vUM8LAofKATeFSLcmov3fKNesnE0bw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Remco Gerlich

unread,
Feb 26, 2016, 4:24:20 AM2/26/16
to django...@googlegroups.com
Thank you all for the comments and links!

We are going to try to simply run Apache/WSGI on Windows, as that seems to be the most normal and best supported option.

I hadn't thought of Cygwin, if we run into trouble maybe we can use something that is part of that.

And as a third option there are dockers and virtual machines et cetera, but I'm optimistic we can simply use Windows.

Thanks,
Remco Gerlich

To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages