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

Dev build #469

Merged
merged 6 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM node:4.2
FROM openmicroscopy/omero-web-standalone:latest

RUN adduser figure
USER root
RUN yum -y install npm
COPY . /home/figure/src
RUN chown -R figure /home/figure/src
USER figure

WORKDIR /home/figure/src

RUN npm install
RUN npm install grunt-cli
RUN $(npm bin)/grunt demo
RUN npm install -g grunt-cli && npm install grunt --save-dev
RUN $(npm bin)/grunt build
RUN /opt/omero/web/venv3/bin/pip install -e .


WORKDIR /home/figure/src/demo
CMD ["python", "-m", "SimpleHTTPServer"]
RUN echo "config set omero.web.application_server development" >> /opt/omero/web/config/01-default-webapps.omero
RUN echo "config set omero.web.debug true" >> /opt/omero/web/config/01-default-webapps.omero
USER omero-web
35 changes: 17 additions & 18 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,38 +163,37 @@ with:

$ grunt watch

To update the demo figure app at http://figure.openmicroscopy.org/demo/
we have a grunt task that concats and moves js files into demo/.
It also replaces Django template tags in index.html and various js code
fragments with static app code. This is all handled by the grunt task:
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:

::

$ grunt demo
$ docker build -t figure-devel .

This puts everything into the omero-figure/demo/ directory.
This can be tested locally via:

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

$ cd demo/
$ python -m SimpleHTTPServer

Go to http://localhost:8000/ to test it.
This will not install the script and dependencies required to export the figure
as PDF.
$ docker run -ti -e OMEROHOST=YOUR_HOST -p 4080:4080 figure-devel

To update the figure.openmicroscopy.org site:
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:

::
$ docker run -ti -e OMEROHOST=YOUR_HOST -p 4080:4080 -v /PATH_TO_GIT_REPO/omero-figure:/home/figure/src figure-devel
jburel marked this conversation as resolved.
Show resolved Hide resolved

- Copy the demo directory and replace the demo directory in gh-pages-staging branch
- Commit changes and open PR against ome/gh-pages-staging as described https://github.com/ome/omero-figure/tree/gh-pages-staging

It is also possible to run the demo in docker without installing anything locally:
After starting the container, run ``docker ps`` in another terminal to find the ID of the container. Then run:

::

$ docker build -t figure-demo .
$ docker run -ti --rm -p 8000:8000 figure-demo
$ docker exec -u 0 -it CONTAINER_ID bash # replace CONTAINER_ID by the correct value
$ cd /home/figure/src
$ grunt watch



Release process
---------------
Expand Down