ome / omero-web-docker

OMERO.web production docker image
https://hub.docker.com/r/openmicroscopy/omero-web/
BSD 2-Clause "Simplified" License
6 stars 19 forks source link

docker-compose with merge-ci build #33

Open joshmoore opened 5 years ago

joshmoore commented 5 years ago

Being used to test https://github.com/ome/omero-web/pull/2

cc: @ome/python

joshmoore commented 5 years ago

Currently failing with:

        location = self._get_python_dir() / "omeroweb"                                                                                  web_1     | OSError: [Errno 13] Permission denied: '/opt/omero/web/venv/lib/python2.7/site-packages/omeroweb/static'
joshmoore commented 5 years ago

Now failing with:

b_1     |   File "/opt/omero/web/venv/lib64/python2.7/os.py", line 157, in makedirs
web_1     |     mkdir(name, mode)
web_1     | OSError: [Errno 13] Permission denied: '/opt/omero/web/venv/lib/python2.7/site-packages/omeroweb/static'
omerowebdocker_web_1 exited with code 1

cc: @ome/python

manics commented 5 years ago

Does setting omero.web.static_root/STATIC_ROOT fix this? https://github.com/ome/omero-web/blob/d176ac3a833dbec2d55afa3eece6a810820c6922/omeroweb/settings.py#L423-L430

joshmoore commented 5 years ago

What do we want the new value to be? Keep it in lib/python? Under var/? Calculate from OMERODIR?

joshmoore commented 5 years ago

Note: STATIC_ROOT (from docker-compose) does not work but omero.web.static_root does.

manics commented 5 years ago

var sounds good, is the whole /var directory being moved to a read-write location?

joshmoore commented 5 years ago

Eventually, I'd think so.

joshmoore commented 5 years ago

Haven't tested yet, but proposing to push this:

commit dde2cfff9519517265c524e67740c68f66681dee (HEAD -> py2)
Author: jmoore <josh@glencoesoftware.com>
Date:   Mon Aug 26 18:30:53 2019 +0200

    Place static files under var/static

diff --git a/omeroweb/settings.py b/omeroweb/settings.py
index 330c64a66..1565d8559 100644
--- a/omeroweb/settings.py
+++ b/omeroweb/settings.py
@@ -424,7 +424,7 @@ CUSTOM_SETTINGS_MAPPINGS = {
           " must end in a slash if set to a non-empty value.")],
     "omero.web.static_root":
         ["STATIC_ROOT",
-         os.path.join(os.path.dirname(__file__), 'static').replace('\\', '/'),
+         os.path.join(OMERO_HOME, 'var', 'static')
joshmoore commented 4 years ago

This will need work with Simon's post-omego world.