Open joshmoore opened 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'
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
Does setting omero.web.static_root
/STATIC_ROOT
fix this?
https://github.com/ome/omero-web/blob/d176ac3a833dbec2d55afa3eece6a810820c6922/omeroweb/settings.py#L423-L430
What do we want the new value to be? Keep it in lib/python
? Under var/
? Calculate from OMERODIR
?
Note: STATIC_ROOT
(from docker-compose) does not work but omero.web.static_root does.
var
sounds good, is the whole /var
directory being moved to a read-write location?
Eventually, I'd think so.
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')
This will need work with Simon's post-omego
world.
Being used to test https://github.com/ome/omero-web/pull/2
cc: @ome/python