Comments (3)
Your suggestion unfortunately will not work in general case as the requirements.txt
file may need to reference a local package that was copied in as part of your source code. So it gets complicated.
That mod_wsgi gets reinstalled is an issue I know of. It is actually installed as part of system wide Python as well and virtual environment chains off that and it is found, but when run out of system Python mod_wsgi wasn't picking up virtual environment correctly. I need to revisit it to work out how to fix that and then I can drop second installation of mod_wsgi. It only came up that that broke things in last week and I had to revert to doing the second installation.
Anyway, I haven't got a lot of time to explain in detail right now, or check my recipe works, as at training day, but presuming running Docker locally and how your Docker system is setup allows local file system mounting, the images are specifically set up to allow you to do.
docker build myapp .
docker run -v `pwd`:/app -p 8000:80 myapp --reload-on-changes
So you build it once to get an image with required dependencies, but then you actually mount the current directory into the container, overlaying and hiding what was copied in. You then ensure that --reload-on-changes
option is also supplied to mod_wsgi-express and you can then make changes to the local file system to code files and your application will auto reload changes. This will allow you to do development.
See if you can get that going and if not tell me what OS you are using and how Docker was installed.
from mod_wsgi-docker.
I kind of figured it wouldn't be that simple, but I figured I would suggest it on the off chance that it would work.
Thanks for the work around; I'll give it a shot.
from mod_wsgi-docker.
The additional reinstall of pip and mod_wsgi shouldn't occur now. This is because the Python virtual environment has been done away with as it causes various problems. If you have stuff in 'requirements.txt', they will still be installed though.
The changes made are quite significant, but everything should still run okay. If you see any problems, especially with access permissions at run time, let me know ASAP.
from mod_wsgi-docker.
Related Issues (20)
- New Apache version HOT 1
- How do I modify the httpd.conf for apache? HOT 2
- static files HOT 16
- : "httpd (pid 7) already running" HOT 1
- Error while building on Windows 10 HOT 5
- docker hub fails with non-onbuild versions HOT 5
- Documentation about process owner HOT 1
- Support for Client Certificates HOT 11
- pip packages not getting cached HOT 9
- Documentation for mod_wsgi express command line flags HOT 1
- 403 error on root when using --mount-point HOT 1
- debian mirrors used in mod-wsgi-docker:python-3.5-onbuild image failing HOT 1
- Enable compress-responses / mod_deflate
- Context path or SCRIPT_NAME when deployed in docker, and proxied throgh front-end apache HOT 1
- ---
- Error while building python-2.7-onbuild HOT 2
- Debian Package Issues HOT 1
- Officially abandon mod_wsgi-docker project. HOT 3
- How to update limit-request-body using this image? HOT 8
- Failed to fetch jessie packages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mod_wsgi-docker.