From 6b015cc7d76aa39a88236ec1383b6499b20e5756 Mon Sep 17 00:00:00 2001 From: Scott Koranda Date: Mon, 23 Mar 2020 15:10:41 -0500 Subject: [PATCH] Document COMANAGE_REGISTRY_NO_DATABASE_CONFIG in cron README.md Document the use of the COMANAGE_REGISTRY_NO_DATABASE_CONFIG environment variable in the README.md file for the cron image. --- comanage-registry-cron/README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/comanage-registry-cron/README.md b/comanage-registry-cron/README.md index 64e323a..c8e3de9 100644 --- a/comanage-registry-cron/README.md +++ b/comanage-registry-cron/README.md @@ -80,7 +80,20 @@ See the [list of environment variables common to all images](../docs/comanage-re including this image. Since this image does not run a webserver many of the environment variables will be ignored by containers instantiated from this image. -If you do not use the same volume that is used with COmanage Registry be sure +If you use the same volume that is used with COmanage Registry then you should +set the environment variable + +``` +COMANAGE_REGISTRY_NO_DATABASE_CONFIG +``` + +to any value so that the cron container does not attempt to also create +the database configuration file along with the COmanage Registry container. +Failure to do so may lead to a race condition where the cron container +writes an incorrect database configuration file because it does not +have access to the same details as the full COmanage Registry container. + +If you do *not* use the same volume that is used with COmanage Registry be sure to set the environment variables * `COMANAGE_REGISTRY_DATASOURCE` @@ -89,6 +102,9 @@ to set the environment variables * `COMANAGE_REGISTRY_DATABASE_USER` * `COMANAGE_REGISTRY_DATABASE_USER_PASSWORD` +so that the container is able to write its own database configuration file +and connect to the database. + See also the next section for details on how to specify the location of the crontab file.