Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update README #515

Closed
wants to merge 10 commits into from
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openmicroscopy/omero-web-standalone:latest
FROM openmicroscopy/omero-web-standalone:5.21.0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FROM openmicroscopy/omero-web-standalone:5.21.0
FROM openmicroscopy/omero-web-standalone:latest

as per @jburel's comment - this works fine for me

Copy link
Member

@pwalczysko pwalczysko Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works fine for me

Sorry, have to eat my words. It works fine only up to a point. This means that the docker image builds fine, and the docker starts as expected. I am able to connect to demo server. But then:

  • if using the latest image, I am not able to watch the changes live as described in this README, for example changing the index.html file and renaming the Export PDF button does not appear immediately after refresh
  • if using the 5.21.0 image, I am able to watch the changes live, ie. the Export PDF button manipulation in the index.html is immediately visible after refresh of the browser

Adding -e CONFIG_omero_web_debug=true to the docker run... cmd with the latest build image does not help, still no changes visible after refresh. Note that the changes are visible if you stop the docker and run the docker run... cmd again - then it works even with the latest image

USER root
RUN yum -y install npm
Expand Down
46 changes: 36 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,35 +163,61 @@ with:

$ grunt watch

It is also possible to develop figure in docker without installing anything locally.
The Docker image is built on top of ``openmicroscopy/omero-web-standalone:latest``, so you will have a fully functional
omero-web environment while developing ``omero-figure``.
First build the Docker image:

Local install
*************

You need an `omero-web` environment. You can either install it locally or use Docker (see below).
To install locally, we recommend that you use `conda` to install `omero-py` as described
at https://github.com/ome/omero-py and then perform a developer install of `omero-figure`
which will include `omero-web`:

::

$ docker build -t figure-devel .
$ cd omero-figure
$ pip install -e .

See instructions at https://omero.readthedocs.io/en/latest/developers/Web/Deployment.html
for running the development server.

Using Docker
************

It is also possible to develop figure in docker without creating a python environment locally.
The Docker image at ``omero-figure/Dockerfile`` is built on top of
`openmicroscopy/omero-web-standalone:latest <https://hub.docker.com/r/openmicroscopy/omero-web-standalone>`_,
so you will have a fully functional omero-web environment while developing ``omero-figure``.
First build the Docker image and specify the server you wish to connect to:

To develop ``omero-figure`` you can either make all the changes within the Docker container itself by running:
::

$ cd omero-figure
$ docker build -t figure-devel .
$ export OMEROHOST=demo.openmicroscopy.org

$ docker run -ti -e OMEROHOST=YOUR_HOST -p 4080:4080 figure-devel
The preferred option is to mount the repository containing the omero-figure code. You can make the changes locally and run `grunt watch`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The preferred option is to mount the repository containing the omero-figure code. You can make the changes locally and run `grunt watch`
The preferred option is to mount the repository containing the omero-figure code. For this, you need to install locally ``npm`` and ``grunt`` as described above. You can make the changes locally and run `grunt watch`

as described above and see changes in the docker container. To do so, run:
::

$ cd /PATH_TO_GIT_REPO/omero-figure
$ grunt build
$ grunt watch # to see updates
will-moore marked this conversation as resolved.
Show resolved Hide resolved
$ docker run -ti -e OMEROHOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel
will-moore marked this conversation as resolved.
Show resolved Hide resolved

The preferred option is to mount the repository containing the omero-figure code. Make the changes locally and see the changes in the docker container. To do so, run:

Alternatively, to run and develop ``omero-figure`` within the Docker container itself:
::
$ docker run -ti -e OMEROHOST=YOUR_HOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel

$ docker run -ti -e OMEROHOST -p 4080:4080 figure-devel
will-moore marked this conversation as resolved.
Show resolved Hide resolved

After starting the container, run ``docker ps`` in another terminal to find the ID of the container. Then run:

::

$ docker exec -u 0 -it CONTAINER_ID bash # replace CONTAINER_ID by the correct value
$ cd /home/figure/src
$ grunt watch
$ vi src/js/app.js
$ grunt build # or run grunt watch in another terminal



Expand Down
Loading