[ome-devel] Bundle of OMERO.web statics
Douglas Russell
douglas_russell at hms.harvard.edu
Thu Aug 17 22:56:59 BST 2017
Thanks for this reply. I've made a few comments inline.
Cheers,
Douglas
On Fri, 4 Aug 2017 at 07:40 William Moore (Staff) <W.Moore at dundee.ac.uk>
wrote:
> Hi Douglas,
>
> Running:
>
> $ python lib/python/omeroweb/manage.py collectstatic —noinput
>
> shouldn’t need most of the dependencies of OMERO.web (Ice, Pillow, numpy,
> omero-marshal etc),
> just Django and probably django-pipeline.
> The OMERO.py download should have everything you need (don’t need the full
> server).
>
Useful to know (I'd assumed the dependency chain would require Ice etc),
but I would have had to install some dependencies on the nginx deployment
that really don't need to be there (python, django, etc), plus install
OMERO.py when all I need are the statics. My eventual solution was able to
reuse the omero-web docker image without basing the final image on this.
>
> If you have installed any OMERO.web apps then they would also have static
> files to collect,
> so any static-files bundle we could provide would need to be customised
> for your own install.
>
>
Good point.
> Is there a way that you can collectstatic on your main OMERO.web server
> and export or
> rsync this to your web server?
>
>
I think this would be possible, but a bit awkward as the Docker container
would then need to be running ssh-server and have credentials to do so. In
the end my solution is not dissimilar to this though, but I did it at image
build time, rather than runtime.
>
> Let us know if you can find a simpler workaround.
> Providing a static files bundle is a nice idea but probably something we’d
> only consider doing if we knew
> it would be important to a bunch of users.
>
For the Docker use case, I did find a good workaround. Multistage builds
allowed me to build a docker image based on openmicroscopy/omero-web and
seamlessly copy the statics into the final stage build based on nginx. The
way I would then advocate someone building a custom Docker based install
would be to build a base image using openmicroscopy/omero-web with whatever
web-apps they wanted to add. Then us the Dockerfile from my omero-nginx
repository modified to use whatever docker image the user built including
web-apps. This would then spit out a docker container based on nginx, with
all the statics required by OMERO.web, plus whatever web apps.
Might sound a little bit convoluted when building custom images with a
custom web-app configuration, but other than combining OMERO.web and nginx
in the same container, it seems like the simplest solution. It is also very
flexible.
>
> Cheers,
>
> Will.
>
>
> > On 3 Aug 2017, at 16:39, Douglas Russell <
> douglas_russell at hms.harvard.edu> wrote:
> >
> > I was trying to build a single process nginx docker image to live
> alongside a single process omero-web image. The difficulty with this is
> that it is necessary to create an image with all of the same dependencies
> as omero-web and download the OMERO.server (or apparently OMERO.py, but I
> haven't tried this) bundle, in order to then run `./manage.py
> collectstatic`.
> >
> > Ideally it would be possible to simply download the statics as this is
> all that is needed besides a bit of nginx config.
> >
> > Thoughts?
> >
> > Douglas
> > _______________________________________________
> > ome-devel mailing list
> > ome-devel at lists.openmicroscopy.org.uk
> > http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
>
> The University of Dundee is a registered Scottish Charity, No: SC015096
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20170817/7d42f3a4/attachment.html>
More information about the ome-devel
mailing list