Skip to content

Latest commit

 

History

History
163 lines (105 loc) · 4.7 KB

USING_DOCKER.md

File metadata and controls

163 lines (105 loc) · 4.7 KB

MerMEId | Source code | Install | Using Docker

Or six steps towards a MerMEId of you own using Docker

This is only partly an alternative to the usual installation procedure.

  1. Ensure that you have eXist DB and Orbeon FORMS
  2. Configure Form and Database
  3. Build MerMEId
  4. Configure Apache
  5. Make docker image
  6. Install database
  7. Final checks

1. Ensure that you have eXist DB and Orbeon FORMS

During traditional installation they should go to your application server/servlet container. Using Docker, you just put them into ./trunk/other-wars and the rest is catered for by the scripting.

2. Configure Form and Database

When using Docker, look for the file mermeid_configuration.xml_docker and enter your host name where indicated:

  <orbeon_dir>http://<your host name>/orbeon/xforms-jsp/mei-form/</orbeon_dir>
  <form_home>http://<your host name>/editor/forms/mei/</form_home>
  <crud_home>http://172.17.0.2/filter/dcm/</crud_home>
  <library_crud_home>http://172.17.0.2/filter/library/</library_crud_home>
  <rism_crud_home>http://172.17.0.2/filter/rism_sigla/</rism_crud_home>
  <server_name>http://<your host name>/</server_name>  
  <exist_dir>storage/</exist_dir>
  <document_root>storage/dcm/</document_root>

Here you have to choose the password of the eXist DB. You will need that later. The configuration is identical.

3. Build MerMEId

For example

 ant -Dwebapp.instance=docker

4. Configure Apache

Please take a look at the sections

  • "Setting up Apache2 as a daemon" and
  • "note that editor is the one only Apache2 user"

in the Dockerfile

It isn't necessary to modify the code there to run MerMEId, but you must do so if you want to have more than one editor user, or if you want change the security settings. See INSTALL.md.

Host server http

In order to get hold of the services we add the following on the server running Docker:

ProxyPass /exist/ "http://172.17.0.2:8080/exist/"
ProxyPass / "http://172.17.0.2/"

5. Make docker image

If you are a seasoned Docker user you might want to review the Dockerfile before building. One thing you might want to uncomment is the section about sshd. It can be nice to be able to log on to the container.

Now you should be able to do everything in one go by running the shell script. It does a little more than just running a docker build.

./build-docker-image.sh

If your docker behaves like mine, it would be possible to run it using

 docker run --name mermeid   <docker image ID>

and everything will run on a local IP 172.17.0.2. The eXist dashboard should be on

http://172.17.0.2:8080/exist/apps/dashboard/index.html

Here you should set the password for the admin user of the database.You have already decided that. See above. There is a paragraph on this in the INSTALL.md

There is one area of the container's file system which is persistent, namely the Tomcat webapps area. Note

VOLUME ["${CATALINA_HOME}/webapps"]

Inside Docker, this evaluates to /usr/local/tomcat/webapps. The way Docker works by default, the volumes used will be found in

/var/lib/docker/volumes/

on your server. Inside there will be very long directory names (64 bytes long). If you ensure that Docker's volumes directory is under backup, you should be safe.

Check

List directory of the docker volumes

ls -l /var/lib/docker/volumes/*/_data/ 

should give something like

drwxr-xr-x 12 root root      4096 okt 24 11:38 editor
-rw-rw-r--  1 root root  15763888 okt 24 11:36 editor.war
drwxr-xr-x  7 root root      4096 okt 24 11:38 exist
-rw-r--r--  1 root root 132149935 okt 22 11:06 exist.war
drwxr-xr-x  5 root root      4096 okt 24 11:39 orbeon
-rw-r--r--  1 root root  63168129 okt 24 11:37 orbeon.war

6. Install database

 ant upload -Dwebapp.instance=docker -Dhostport=172.17.0.2:8080

See also Install database

7. Final checks

Follow the final checks in INSTALL.md