mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
CORDA-2888 change default dataSource.url to match the docker container structure. (#5098)
* If there is no dataSourceProperties in the node.conf, the default value is modified to match the docker structure and documentation of having a persistence folder. * chagnes according to pr review.
This commit is contained in:
parent
395dda3706
commit
6a10b4cff6
@ -4,4 +4,10 @@ if [[ ${JVM_ARGS} == *"Xmx"* ]]; then
|
||||
echo "WARNING: the use of the -Xmx flag is not recommended within docker containers. Use the --memory option passed to the container to limit heap size"
|
||||
fi
|
||||
|
||||
java -Djava.security.egd=file:/dev/./urandom -Dcapsule.jvm.args="${JVM_ARGS}" -jar /opt/corda/bin/corda.jar --base-directory /opt/corda --config-file ${CONFIG_FOLDER}/node.conf ${CORDA_ARGS}
|
||||
count=$(grep -c dataSourceProperties ${CONFIG_FOLDER}/node.conf)
|
||||
|
||||
if [ "$count" -eq 0 ]; then
|
||||
java -Djava.security.egd=file:/dev/./urandom -Dcapsule.jvm.args="${JVM_ARGS}" -Dcorda.dataSourceProperties.dataSource.url="jdbc:h2:file:"${PERSISTENCE_FOLDER}"/persistence;DB_CLOSE_ON_EXIT=FALSE;WRITE_DELAY=0;LOCK_TIMEOUT=10000" -jar /opt/corda/bin/corda.jar --base-directory /opt/corda --config-file ${CONFIG_FOLDER}/node.conf ${CORDA_ARGS}
|
||||
else
|
||||
java -Djava.security.egd=file:/dev/./urandom -Dcapsule.jvm.args="${JVM_ARGS}" -jar /opt/corda/bin/corda.jar --base-directory /opt/corda --config-file ${CONFIG_FOLDER}/node.conf ${CORDA_ARGS}
|
||||
fi
|
@ -6,6 +6,7 @@ Running a node connected to a Compatibility Zone in Docker
|
||||
|
||||
.. note:: Requirements: A valid node.conf and a valid set of certificates - (signed by the CZ)
|
||||
|
||||
|
||||
In this example, the certificates are stored at ``/home/user/cordaBase/certificates``, the node configuration is in ``/home/user/cordaBase/config/node.conf`` and the CorDapps to run are in ``/path/to/cordapps``
|
||||
|
||||
.. code-block:: shell
|
||||
@ -33,6 +34,9 @@ If using the H2 database:
|
||||
|
||||
5. Persistence - the folder to hold the H2 database files must be mounted at location ``/opt/corda/persistence``
|
||||
|
||||
.. note:: If there is no dataSourceProperties key in the node.conf, the docker container overrides the url for H2 to point to the persistence directory by default so that the database can be accessed outside the container
|
||||
|
||||
|
||||
Running a node connected to a Bootstrapped Network
|
||||
--------------------------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user