In this environment all the containers will be launched in distinct docker network (it will be called 'dms' in this doc)

docker network create --driver bridge dms

After creating the network, we're starting our postgres and elasticsearch containers. No need to provide ports with '-p' option. Inside the internal network all the ports exposed in Dockerfile are accessible without extra options.

Start DMS Postgres image

docker run -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /home/nuxeo/docker/postgres_backup:/backup -v /home/nuxeo/docker/postgres_data:/var/lib/postgresql/data --net=dms --name postgres -d practiceinsight/dms_postgresql:2.0

Start DMS Elasticsearch image

Official image v.1.4.4 will be used (it is used in official nuxeo docker image, but it's not available now via docker hub)

Run command:

docker run -v /home/nuxeo/docker/elastic:/usr/share/elasticsearch/data --name=elastic -d --net=dms elasticsearch:1.4.4

Start DMS Nuxeo image

In all configurations we have a static version that not changes in different environments and dynamic one (credentials to connect databases), so i've added the static part to the container.

Static part:

JAVA_OPTS = -Dfile.encoding=UTF-8 -Dmail.mime.decodeparameters=true -Dmail.mime.decodefilename=true -Djava.util.Arrays.useLegacyMergeSort=true
nuxeo.vcs.blocking-timeout-millis=1000
nuxeo.vcs.max-pool-size=200
elasticsearch.override.pageproviders=default_search,pi_elastic_search
launcher.start.max.wait = 600
nuxeo.templates=postgresql,drive,drive,drive,pi-nx-repository
nuxeo.wizard.done=true
patricia.db.jdbcDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver
nuxeo.db.host=postgres
nuxeo.db.port=5432
nuxeo.db.name=nuxeo
nuxeo.db.user=nuxeo
nuxeo.db.password=nuxeop
org.nuxeo.big.file.size.limit=1000G
nuxeo.path.segment.maxsize=200
nuxeo.db.transactiontimeout=3600  
elasticsearch.addressList=localhost:9300
elasticsearch.clusterName=elasticsearch
elasticsearch.indexName=nuxeo
elasticsearch.indexNumberOfShards=5
elasticsearch.indexNumberOfReplicas=0
In dynamic part user determines the memory consumption of nuxeo and can provide new options or override old ones.
Dynamic part for nux7:
JAVA_OPTS=$JAVA_OPTS -Xms1024m -Xmx2048m

patricia.db.jdbcUrl=jdbc:sqlserver://10.120.5.51:1433;databaseName=patricia_demo_2;integratedSecurity=false
patricia.db.username=sa
patricia.db.password=Skype#567

If you want to use other credentials for postgres, for example, you should just add this option to your nuxeo.conf, so it will look that way:

JAVA_OPTS=$JAVA_OPTS -Xms1024m -Xmx2048m

patricia.db.jdbcUrl=jdbc:sqlserver://10.120.5.51:1433;databaseName=patricia_demo_2;integratedSecurity=false
patricia.db.username=sa
patricia.db.password=Skype#567
nuxeo.db.name=nuxeodm
nuxeo.db.user=nuxeodm

Then docker just concatenates 2 parts together on container start.

 

Run command, we need to add '-p' option, because we will use this port from external network:

docker run -p 8080:8080 -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /home/nuxeo/docker/nuxeo:/var/lib/nuxeo/data  -v /home/nuxeo/docker/conf:/etc/nuxeo --net=dms --name nuxeo -d practiceinsight/dms_nuxeo:1.9.7.1

Start DMS Casebrowser image

Nothing complicated here, we just need to provide pi-nuxeo.xml to the container

docker run -p 9080:9080 -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /home/nuxeo/docker/conf:/etc/nuxeo --net=dms -d --name cb practiceinsight/dms_casebrowser:1.9.7.1

Start DMS service container

Requirements to run:

  1. Docker socket must be mounted to the container
  2. HOSTNAME variable must be provided (will be used in generated email messages)
  3. EMAIL variable must be provided (will be used in generated email messages as a list of recipients)
  4. CONTAINER_NUMBER variable must be provided for monitoring scripts (it's monitoring number of launched containers)

 

docker run -e HOSTNAME='nux5.priv.practiceinsight' -e EMAIL='paul.igumnov@practiceinsight.io,sumit.patel@practiceinsight.io,Michael.Fleuchaus@practiceinsight.io' -e CONTAINER_NUMBER='5' -d -v /var/run/docker.sock:/var/run/docker.sock  -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro --pid=host --name service practiceinsight/dms_service:new
docker run -e HOSTNAME='nux5.priv.practiceinsight.io' -e EMAIL='paul.igumnov@practiceinsight.io,jake.wang@practiceinsight.io' -d -v /var/run/docker.sock:/var/run/docker.sock --pid=host --name service practiceinsight/dms_service:1.2

 

This image contains 4 scripts: restart, cleanup, availability monitor and health check.