Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
cd dms/prod/dms_nuxeo
docker build -t asia.gcr.io/pi-devops/dms_nuxeo:1.9.6.2 .

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
In dynamic part user determines the memory consumption of nuxeo and credentials for services.
Dynamic part for nux5:
Code Block
JAVA_OPTS=$JAVA_OPTS -Xms1024m -Xmx2048m
nuxeo.db.name=nuxeo
nuxeo.db.user=nuxeo
nuxeo.db.password=nuxeop

patricia.db.jdbcDriver=com.microsoft.sqlserver.jdbc.SQLServerDriver
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=0

Then docker just concatenates 2 parts together on container start.

 

Run command:

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

...