Skip to content

Commit 3e86008

Browse files
authored
Merge pull request #12 from manics/standalone
Standalone OMERO.web image using whitenoise
2 parents 0d586fe + cfc9b40 commit 3e86008

File tree

3 files changed

+38
-4
lines changed

3 files changed

+38
-4
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,36 @@ OMERO.web Docker
44
A CentOS 7 based Docker image for OMERO.web.
55

66

7-
Running the image
8-
-----------------
7+
Standalone image: omero-web-standalone
8+
--------------------------------------
9+
10+
The quickest way to obtain a running OMERO.web server is to use
11+
the [standalone image](https://hub.docker.com/r/openmicroscopy/omero-web-standalone/)
12+
which uses the [WhiteNoise package](http://whitenoise.evans.io/en/stable/)
13+
to avoid the need for Nginx.
914

1015
To run the Docker image you can set a single OMERO.server to connect to by defining `OMEROHOST`:
1116

1217
docker run -d --name omero-web \
1318
-e OMEROHOST=omero.example.org \
1419
-p 4080:4080 \
15-
openmicroscopy/omero-web
20+
openmicroscopy/omero-web-standalone
1621

1722
Alternative all configuration options can be set using environment variables, for example:
1823

1924
docker run -d --name omero-web \
2025
-e CONFIG_omero_web_server__list='[["omero.example.org", 4064, "omero"]]' \
2126
-e CONFIG_omero_web_debug=true \
2227
-p 4080:4080 \
23-
openmicroscopy/omero-web
28+
openmicroscopy/omero-web-standalone
29+
30+
31+
Minimal OMERO.web image: omero-web
32+
----------------------------------
33+
34+
[omero-web](https://hub.docker.com/r/openmicroscopy/omero-web/)
35+
is a minimal OMERO.web image which requires additional configuration for serving Django static files.
36+
For example, you can use https://github.com/dpwrussell/omero-nginx-docker
2437

2538

2639
Configuration

standalone/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM openmicroscopy/omero-web:latest
2+
3+
4+
USER root
5+
RUN /opt/omero/web/venv/bin/pip install 'whitenoise<4' && \
6+
echo "config append -- omero.web.middleware '{\"index\": 0, \"class\": \"whitenoise.middleware.WhiteNoiseMiddleware\"}'" > /opt/omero/web/config/whitenoise.omero
7+
USER omero-web

test.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -u
55

66
PREFIX=test
77
IMAGE=omero-web:$PREFIX
8+
STANDLONE=omero-web-standalone:$PREFIX
89

910
CLEAN=${CLEAN:-y}
1011

@@ -27,3 +28,16 @@ docker run -d --name $PREFIX-web \
2728
$IMAGE
2829

2930
bash test_getweb.sh
31+
32+
# Standalone image
33+
cleanup
34+
sed -i "s/FROM .*/FROM $IMAGE/" standalone/Dockerfile
35+
36+
docker build -t $STANDLONE standalone/
37+
docker run -d --name $PREFIX-web \
38+
-e CONFIG_omero_web_server__list='[["omero.example.org", 4064, "test-omero"]]' \
39+
-e CONFIG_omero_web_debug=true \
40+
-p 4080:4080 \
41+
$STANDLONE
42+
43+
bash test_getweb.sh

0 commit comments

Comments
 (0)