...
For the build, next command must be executed from the folder with Dockerfile of PostgreSQL image.
Code Block |
---|
cd work/dms/prod/dms_postgresql
docker build -t asia.gcr.io/pi-devops/dms_postgresql:1.0 . |
docker run -p 5432:5432 -v /home/nuxeo/docker/postgres_backup:/backup -v /home/nuxeo/docker/postgres_data:/var/lib/postgresql/data --net=host --name postgres -d asia.gcr.io/pi-devops/dms_postgresql:1.0 |
Build DMS
...
Official one will be used
Run command:
Code Block |
---|
docker run -p 9200:9200 -p 9300:9300 -v /home/nuxeo/docker/elastic:/usr/share/elasticsearch/data --name=elastic elasticsearch:1.7.5 |
Build DMS Nuxeo 7.3 image
The image contains Nuxeo 7.3 with updated entrypoint. To build this image, please use the commands below:
...
Code Block |
---|
cd dms/prod/dms_nuxeo docker build -t asia.gcr.io/pi-devops/dms_nuxeo:1.9.6.2 . |
Build DMS Casebrowser image
To build this image, please run the commands below:
Code Block |
---|
cd dms/prod/dms_casebrowser
docker build -t asia.gcr.io/pi-devops/dms_casebrowser:1.9.6.2 . |
Run commands
In this environment all the containers will be launched in distinct docker network (it will be called 'dms' in this doc)
Code Block | ||||
---|---|---|---|---|
| ||||
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
Code Block |
---|
docker run -v /home/nuxeo/docker/postgres_backup:/backup -v /home/nuxeo/docker/postgres_data:/var/lib/postgresql/data --net=dms --name postgres -d asia.gcr.io/pi-devops/dms_postgresql:1.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:
Code Block |
---|
docker run -v /home/nuxeo/docker/elastic:/usr/share/elasticsearch/data --name=elastic --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:
Code Block |
---|
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.path.segment.maxsize=256
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
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 credentials for services can provide new options or override old ones.
Dynamic part for nux5nux7:
Code Block | ||
---|---|---|
| ||
JAVA_OPTS=$JAVA_OPTS -Xms1024m -Xmx2048m nuxeopatricia.db.name=nuxeo nuxeo.db.user=nuxeo nuxeo.db.password=nuxeop jdbcUrl=jdbc:sqlserver://10.120.5.51:1433;databaseName=patricia_demo_2;integratedSecurity=false patricia.db.username=sa patricia.db.jdbcDriver=com.microsoft.sqlserver.jdbc.SQLServerDriverpassword=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:
Code Block | ||
---|---|---|
| ||
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 elasticsearch.addressList=localhost:9300 elasticsearch.clusterName=elasticsearch elasticsearch.indexName=nuxeo elasticsearch.indexNumberOfReplicas=0nuxeo.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:
Code Block |
---|
docker run -p 8080:8080 -v /home/nuxeo/docker/nuxeo:/var/lib/nuxeo/data -v /home/nuxeo/docker/conf:/etc/nuxeo --net=host --name nuxeo -d asia.gcr.io/pi-devops/dms_nuxeo:1.9.6.2 |
...
Start DMS Casebrowser image
To build this image, please run the commands below:
Code Block |
---|
cd dms/prod/dms_casebrowser
docker build -t asia.gcr.io/pi-devops/dms_casebrowser:1.9.6.2 . |
Run command:
Nothing complicated here, we just need to provide pi-nuxeo.xml to the container
Code Block |
---|
docker run -p 9080:9080 -v /home/nuxeo/docker/conf:/etc/nuxeo --net=host dms -d -name cb asia.gcr.io/pi-devops/dms_casebrowser:1.9.6.2 |