-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
static files #15
Comments
More information is required. What do you have in your Have you added a Has Django settings module had The output from doing the |
Here is the content of my Dockerfile : FROM grahamdumpleton/mod-wsgi-docker:python-2.7-onbuild stcypvacances is the name of my Django project. I don't know what a build action hook is. In my Django settings.py I have : STATIC_ROOT = os.path.join(BASE_DIR, 'static') The output of the build is : Sending build context to Docker daemon 18.34 MB |
If you haven't already, look at: This shows what you would need for Django. The primary things are:
Just note that I have the Django project pushed down into a sub directory. You would need to adjust some of the values to match what you have. Now the question is whether you want to still use I have also posted about it on my blog and there is: I will be ramping up documentation and getting a 1.0 release done in the next month or so. |
I cloned the github.com/GrahamDumpleton/mod_wsgi-docker repo. |
Take out:
|
Nice ! It worked ! I am happy. |
I think this has to be in the documentation. |
As I said already, this image is being superseded. So am investing time in the replacement instead. I also don't understand why it didn't work with the |
Is there a clean way to run collectstatic when the container starts (not at build)? I would like to have a single image that has multiple django settings files (e.g. dev, qa, prod). The result of collectstatic is going to be slightly different depending on the settings file (i.e CDN location). Right now, I can run collectstatic with specified settings file with "docker exec" after the container starts, but wondering if there's a better way. |
Create an executable shell script at |
Hi Graham, Is the new version in docker hub? I'm having trouble figuring out where to put static files for / so that they are served from apache directly. I tried adding a second
i know how to do this with a Thanks, |
Use This will set |
Note that when running Django, you would only use this for things like |
I've used react to build |
Hi Graham, thanks for these docker images. I know this is an old thread but I have a somewhat related question. Suppose you have how can we specify that |
There is no caching setup in Apache when used with mod_wsgi-express. Static files are always served direct off disk, so a restart/reload of Apache should not be required for changes to existing static files, or new files, to be visible. |
The static files of my Django application are not served.
The text was updated successfully, but these errors were encountered: