Open dpwrussell opened 7 years ago
Presumably this is because there should be an nginx container as well? When digging I saw that this is not integrated into this image.
The nginx configuration would be more complicated than usual I think because it would have to be configured to use TCP for the upstream gunicorn.
That's right, I followed best practice by not including Nginx in the same container. I've had some success with using whitenoise
to serve requests including statics directly from Django http://whitenoise.evans.io/en/stable/
In this example I've added it directly to the playbook, but since these changes are just additions it's trivial to add it to a derived container FROM openmicroscopy/omero-web
: https://github.com/openmicroscopy/omero-web-docker/compare/master...manics:whitenoise?expand=1
Enabling whitenoise
in this production image could be an option, but could potentially interfere with anyone doing advance config of their OMERO.web docker. Thoughts?
Sure, that is the best practice. However, I'm not sure if we would want to be changing (to whitenoise
) the recommended OMERO best practice (nginx) for just the containerized approach, particularly as people may have other reasons to follow the recommended nginx setup (not least being a closer setup match to a non-containerized server).
Assuming the above statement holds, I think it would be necessary to either maintain another omero-web-nginx
docker image (exteneded from nginx
) or to relax docker best practice and make the default OMERO.web + nginx. Otherwise any users will be faced with trying to build a custom nginx container before they can use web. The static files would have to be copied there for a start which necessitates a download and install of OMERO.web. Inter-container volume sharing will not be sufficient because the docker containers may not be co-located.
I think one goal should be to make it possible to start several containers and without any configuration or extension, have a working OMERO stack.
Do you know how other Django apps deal with statics in containers? It sounds like this should be a solved problem.
As far as I can tell, the two approaches I mentioned are what I have seen used.
The monolith seems most common perhaps.
I could see us having two images, plain omero-web, and either omero-web-nginx (OMERO.web + nginx) or nginx-omero-web-static.
Docker started with example parameters from README.
None of the static resources are found. E.g.