tag:blogger.com,1999:blog-2363643920942057324.post662813245360317765..comments2023-08-09T23:00:54.857+10:00Comments on Graham Dumpleton: Hosting Python WSGI applications using Docker.Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-2363643920942057324.post-57225544965804620452016-11-23T11:53:01.590+11:002016-11-23T11:53:01.590+11:00I have a newer Docker image which supersedes this ...I have a newer Docker image which supersedes this one and which is much smarter. It includes knowledge about Django and will run collectstatic for during the build and automatically configure mod_wsgi to host the static files as well. I talk a bit about it in http://blog.dscpl.com.au/2016/02/building-better-user-experience-for.htmlGraham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-73678899320609659502016-11-23T11:49:17.630+11:002016-11-23T11:49:17.630+11:00For those of you as confused as I was, he said to ...For those of you as confused as I was, he said to run Django's <b>collectstatic</b> on the host machine; it does not run it for you during the <b>docker build</b>!<br /><br />In the original project directory:<br />1. mkdir ./htdocs/<br />2. Add the STATIC_DIR... stuf to settings.py<br />3. python manage.py collectstatic<br />4. Now do: docker build -t name ....Anonymoushttps://www.blogger.com/profile/03986585799950502898noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-61087057133563224952016-05-19T03:14:06.238+10:002016-05-19T03:14:06.238+10:00Hi Graham,
Thank you for this walkthrough. So far...Hi Graham,<br /><br />Thank you for this walkthrough. So far it is excellent. I am new to Python, but think there is an indentation error (or perhaps it just looks funny?) in the sample code for wsgi.py -- it failed for me until I indented each line below the `def` statement.zero referencehttps://www.blogger.com/profile/05996128370825821029noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-39121264005253950432015-07-25T19:33:03.334+10:002015-07-25T19:33:03.334+10:00If you are using OS X, then this command comes rea...If you are using OS X, then this command comes really handy:<br />VBoxManage controlvm boot2docker-vm natpf1 "my-running-app,tcp,127.0.0.1,8000,,8000"<br />to expose the port from the Virtual Box to the local machine.Емил Атанасовhttps://www.blogger.com/profile/07399849208927226450noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-45917487682103587552015-06-16T09:20:08.867+10:002015-06-16T09:20:08.867+10:00@Eibriel Best to hop onto the mod_wsgi mailing lis...@Eibriel Best to hop onto the mod_wsgi mailing list:<br /><br />http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Asking_Your_Questions<br /><br />as easier to discuss there. There are a couple of options as I far as I understand what you want to do.Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-61497736361903012242015-06-15T22:15:36.784+10:002015-06-15T22:15:36.784+10:00Hi!
I've noticed that every time I make a chan...Hi!<br />I've noticed that every time I make a change on the code I need to rebuild the docker and the build script install the pip requirements (which is time consuming).<br /><br />How can I install my own requirements from Dockerfile to prevent that?<br /><br />Thanks!!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-39615494451611653472015-02-06T07:40:10.781+11:002015-02-06T07:40:10.781+11:00That doesn't appear to me indicate any issue w...That doesn't appear to me indicate any issue with the Dockerfile or the image but your ability to communicate with the Python Package Index (PyPi) to download the mod_wsgi package. You may be affected by a transient issue with PyPi which although rare, does happen. I would suggest you retry.<br />Graham Dumpletonhttps://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-35739858949610003282015-02-06T03:54:25.914+11:002015-02-06T03:54:25.914+11:00Graham,
Thank you for a concise post about using...Graham, <br /><br />Thank you for a concise post about using mod_wsgi in docker. I tried your Dockerfile to run and build as suggested but it fails with the following error<br /><i><br />sudo docker build -t my-python-app .<br />...<br />Step onbuild-0 : COPY . /app<br /> ---> Using cache<br /> ---> 3bbc2d8b8fbc<br />Step onbuild-1 : RUN mod_wsgi-docker-build<br /> ---> Running in Anonymoushttps://www.blogger.com/profile/16820711839674200891noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-56320519587012579022015-01-13T14:33:26.220+11:002015-01-13T14:33:26.220+11:00Awesome and thorough post. Very useful. Thanks!Awesome and thorough post. Very useful. Thanks!Michael Sagehttps://www.blogger.com/profile/02447059297795091561noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-83047289385456370952014-12-03T04:37:15.199+11:002014-12-03T04:37:15.199+11:00Fantastic! I was actually looking for an article l...Fantastic! I was actually looking for an article like this a couple of days ago and was shocked not to find anything. I'm really looking forward to the upcoming articles.Tom Purlhttps://www.blogger.com/profile/07858160814242233775noreply@blogger.com