Follow the steps below, to configure persistence for logging,
-
Create a Docker volume for managing Dispatcher configuration and log persistence by issuing the host shell command:
docker volume create dispatcher-jdbc
-
To initialize data in this volume, issue the host shell command:
docker run --rm -it -v dispatcher-jdbc:/tmp/conf -v $CONNECT/deploy/swarm/config/EC_HOME/jdbc:/tmp/src alpine /bin/sh -c "cp -R /tmp/src/* /tmp/conf; chown -R 101:101 /tmp/conf; chmod -R 755 /tmp/conf"
If any files in jdbc directory are changed in the future, you must execute this command again to copy the files to the volume.
-
To create a Docker volume for managing Tomcat configuration, issue the host shell command below,
docker volume create tomcat-conf
-
To initialize data in this volume, issue the host shell command:
docker run --rm -it -v tomcat-conf:/tmp/conf -v $CONNECT/deploy/swarm/config/tomcat:/tmp/src alpine /bin/sh -c "cp -R /tmp/src/* /tmp/conf; chown -R 101:101 /tmp/conf; chmod -R 755 /tmp/conf"
If any files in the tomcat directory are changed in the future, you must execute this command again to copy the files to the volume.
-
To create a Docker volume for managing Tomcat logs, issue the command below,
docker volume create tomcat-log
-
To initialize permissions in this volume, issue the host shell command:
docker run --rm -it -v tomcat-log:/tmp/log alpine /bin/sh -c "chown -R 101:101 /tmp/log "
-
To create a Docker volume for managing Dispatcher logs, issue the command below,
docker volume create dispatcher-log
-
To initialize permissions in this volume, issue the host shell command:
docker run --rm -it -v dispatcher-log:/tmp/log alpine /bin/sh -c "chown -R 101:101 /tmp/log "