From fe2ef151969a141528f25c878663dc9b1100c501 Mon Sep 17 00:00:00 2001 From: Alan Ivey Date: Mon, 6 Nov 2023 14:49:45 -0500 Subject: [PATCH] docs: explanation for setting values in dhis.conf Mapping ConfigurationKey.java will grow stale, so replace with an explanation [skip ci] --- README.md | 345 ++---------------------------------------------------- 1 file changed, 7 insertions(+), 338 deletions(-) diff --git a/README.md b/README.md index 68fd45a..245452b 100644 --- a/README.md +++ b/README.md @@ -462,344 +462,13 @@ required. ### All configuration options -All supported environment values for setting configuration options in _dhis.conf_ are below. -Values are common to 2.35.0 and up (this list does not include [up to five -read-replicas](#read-replicas) or [up to 10 Azure AD OIDC -providers](#azure-oidc)): - -* `DHIS2_ANALYTICS_CACHE_EXPIRATION`: Value of _analytics.cache.expiration_. - -* `DHIS2_APPHUB_API_URL`: Value of _apphub.api.url_. - -* `DHIS2_APPHUB_BASE_URL`: Value of _apphub.base.url_. - -* `DHIS2_ARTEMIS_EMBEDDED_PERSISTENCE`: Value of _artemis.embedded.persistence_. - -* `DHIS2_ARTEMIS_EMBEDDED_SECURITY`: Value of _artemis.embedded.security_. - -* `DHIS2_ARTEMIS_HOST`: Value of _artemis.host_. - -* `DHIS2_ARTEMIS_MODE`: Value of _artemis.mode_. - -* `DHIS2_ARTEMIS_PASSWORD`: Value of _artemis.password_. - -* `DHIS2_ARTEMIS_PORT`: Value of _artemis.port_. - -* `DHIS2_ARTEMIS_USERNAME`: Value of _artemis.username_. - -* `DHIS2_AUDIT_AGGREGATE`: Value of _audit.aggregate_. - -* `DHIS2_AUDIT_DATABASE`: Value of _audit.database_. - -* `DHIS2_AUDIT_LOGGER`: Value of _audit.logger_. - -* `DHIS2_AUDIT_METADATA`: Value of _audit.metadata_. - -* `DHIS2_AUDIT_TRACKER`: Value of _audit.tracker_. - -* `DHIS2_CHANGELOG_AGGREGATE`: Value of _changelog.aggregate_. - -* `DHIS2_CHANGELOG_TRACKER`: Value of _changelog.tracker_. - -* `DHIS2_CLUSTER_CACHE_PORT`: Value of _cluster.cache.port_. - -* `DHIS2_CLUSTER_CACHE_REMOTE_OBJECT_PORT`: Value of _cluster.cache.remote.object.port_. - -* `DHIS2_CLUSTER_HOSTNAME`: Value of _cluster.hostname_. - -* `DHIS2_CLUSTER_MEMBERS`: Value of _cluster.members_. - -* `DHIS2_CONNECTION_DIALECT`: Value of _connection.dialect_. - -* `DHIS2_CONNECTION_DRIVER_CLASS`: Value of _connection.driver_class_. - -* `DHIS2_CONNECTION_PASSWORD`: Value of _connection.password_. - -* `DHIS2_CONNECTION_POOL_ACQUIRE_INCR`: Value of _connection.pool.acquire_incr_. - -* `DHIS2_CONNECTION_POOL_IDLE_CON_TEST_PERIOD`: Value of _connection.pool.idle.con.test.period_. - -* `DHIS2_CONNECTION_POOL_INITIAL_SIZE`: Value of _connection.pool.initial_size_. - -* `DHIS2_CONNECTION_POOL_MAX_IDLE_TIME`: Value of _connection.pool.max_idle_time_. - -* `DHIS2_CONNECTION_POOL_MAX_IDLE_TIME_EXCESS_CON`: Value of - _connection.pool.max_idle_time_excess_con_. - -* `DHIS2_CONNECTION_POOL_MAX_SIZE`: Value of _connection.pool.max_size_. - -* `DHIS2_CONNECTION_POOL_MIN_SIZE`: Value of _connection.pool.min_size_. - -* `DHIS2_CONNECTION_POOL_TEST_ON_CHECKIN`: Value of _connection.pool.test.on.checkin_. - -* `DHIS2_CONNECTION_POOL_TEST_ON_CHECKOUT`: Value of _connection.pool.test.on.checkout_. - -* `DHIS2_CONNECTION_SCHEMA`: Value of _connection.schema_. - -* `DHIS2_CONNECTION_URL`: Value of _connection.url_. - -* `DHIS2_CONNECTION_USERNAME`: Value of _connection.username_. - -* `DHIS2_ENCRYPTION_PASSWORD`: Value of _encryption.password_. - -* `DHIS2_FILESTORE_CONTAINER`: Value of _filestore.container_. - -* `DHIS2_FILESTORE_IDENTITY`: Value of _filestore.identity_. - -* `DHIS2_FILESTORE_LOCATION`: Value of _filestore.location_. - -* `DHIS2_FILESTORE_PROVIDER`: Value of _filestore.provider_. - -* `DHIS2_FILESTORE_SECRET`: Value of _filestore.secret_. - -* `DHIS2_FLYWAY_MIGRATE_OUT_OF_ORDER`: Value of _flyway.migrate_out_of_order_. - -* `DHIS2_GOOGLE_SERVICE_ACCOUNT_CLIENT_ID`: Value of _google.service.account.client.id_. - -* `DHIS2_LDAP_MANAGER_DN`: Value of _ldap.manager.dn_. - -* `DHIS2_LDAP_MANAGER_PASSWORD`: Value of _ldap.manager.password_. - -* `DHIS2_LDAP_SEARCH_BASE`: Value of _ldap.search.base_. - -* `DHIS2_LDAP_SEARCH_FILTER`: Value of _ldap.search.filter_. - -* `DHIS2_LDAP_URL`: Value of _ldap.url_. - -* `DHIS2_LEADER_TIME_TO_LIVE_MINUTES`: Value of _leader.time.to.live.minutes_. - -* `DHIS2_LOGGING_FILE_MAX_ARCHIVES`: Value of _logging.file.max_archives_. - -* `DHIS2_LOGGING_FILE_MAX_SIZE`: Value of _logging.file.max_size_. - -* `DHIS2_METADATA_SYNC_RETRY`: Value of _metadata.sync.retry_. - -* `DHIS2_METADATA_SYNC_RETRY_TIME_FREQUENCY_MILLISEC`: Value of - _metadata.sync.retry.time.frequency.millisec_. - -* `DHIS2_MONITORING_API_ENABLED`: Value of _monitoring.api.enabled_. - -* `DHIS2_MONITORING_CPU_ENABLED`: Value of _monitoring.cpu.enabled_. - -* `DHIS2_MONITORING_DBPOOL_ENABLED`: Value of _monitoring.dbpool.enabled_. - -* `DHIS2_MONITORING_HIBERNATE_ENABLED`: Value of _monitoring.hibernate.enabled_. - -* `DHIS2_MONITORING_JVM_ENABLED`: Value of _monitoring.jvm.enabled_. - -* `DHIS2_MONITORING_UPTIME_ENABLED`: Value of _monitoring.uptime.enabled_. - -* `DHIS2_NODE_ID`: Value of _node.id_. - -* `DHIS2_OIDC_OAUTH2_LOGIN_ENABLED`: Value of _oidc.oauth2.login.enabled_. - -* `DHIS2_OIDC_PROVIDER_GOOGLE_CLIENT_ID`: Value of _oidc.provider.google.client_id_. - -* `DHIS2_OIDC_PROVIDER_GOOGLE_CLIENT_SECRET`: Value of _oidc.provider.google.client_secret_. - -* `DHIS2_OIDC_PROVIDER_GOOGLE_MAPPING_CLAIM`: Value of _oidc.provider.google.mapping_claim_. - -* `DHIS2_REDIS_ENABLED`: Value of _redis.enabled_. - -* `DHIS2_REDIS_HOST`: Value of _redis.host_. - -* `DHIS2_REDIS_PASSWORD`: Value of _redis.password_. - -* `DHIS2_REDIS_PORT`: Value of _redis.port_. - -* `DHIS2_REDIS_USE_SSL`: Value of _redis.use.ssl_. - -* `DHIS2_SERVER_BASE_URL`: Value of _server.base.url_. - -* `DHIS2_SERVER_HTTPS`: Value of _server.https_. - -* `DHIS2_SYSTEM_MONITORING_PASSWORD`: Value of _system.monitoring.password_. - -* `DHIS2_SYSTEM_MONITORING_URL`: Value of _system.monitoring.url_. - -* `DHIS2_SYSTEM_MONITORING_USERNAME`: Value of _system.monitoring.username_. - -* `DHIS2_SYSTEM_READ_ONLY_MODE`: Value of _system.read_only_mode_. - -* `DHIS2_SYSTEM_SESSION_TIMEOUT`: Value of _system.session.timeout_. - -* `DHIS2_SYSTEM_SQL_VIEW_TABLE_PROTECTION`: Value of _system.sql_view_table_protection_. - -* `DHIS2_TRACKER_TEMPORARY_OWNERSHIP_TIMEOUT`: Value of _tracker.temporary.ownership.timeout_. - - -### Added options - -Added in 2.35.1, 2.36.0: - -* `DHIS2_OIDC_LOGOUT_REDIRECT_URL`: Value of _oidc.logout.redirect_url_. - -* `DHIS2_OIDC_PROVIDER_WSO2_CLIENT_ID`: Value of _oidc.provider.wso2.client_id_. - -* `DHIS2_OIDC_PROVIDER_WSO2_CLIENT_SECRET`: Value of _oidc.provider.wso2.client_secret_. - -* `DHIS2_OIDC_PROVIDER_WSO2_DISPLAY_ALIAS`: Value of _oidc.provider.wso2.display_alias_. - -* `DHIS2_OIDC_PROVIDER_WSO2_ENABLE_LOGOUT`: Value of _oidc.provider.wso2.enable_logout_. - -* `DHIS2_OIDC_PROVIDER_WSO2_MAPPING_CLAIM`: Value of _oidc.provider.wso2.mapping_claim_. - -* `DHIS2_OIDC_PROVIDER_WSO2_SERVER_URL`: Value of _oidc.provider.wso2.server_url_. - -Added in 2.35.2, 2.36.0: - -* `DHIS2_FLYWAY_REPAIR_BEFORE_MIGRATION`: Value of _flyway.repair_before_migration_. - -* `DHIS2_SYSTEM_PROGRAM_RULE_SERVER_EXECUTION`: Value of _system.program_rule.server_execution_. - -Added in 2.35.4, 2.36.0: - -* `DHIS2_ARTEMIS_EMBEDDED_THREADS`: Value of _artemis.embedded.threads_. - -* `DHIS2_AUDIT_IN_MEMORY_QUEUE_ENABLED`: Value of _audit.in_memory_queue.enabled_; Removed in - 2.38.0. - -Added in 2.35.7, 2.36.4, 2.37.0: - -* `DHIS2_CONNECTION_POOL_NUM_HELPER_THREADS`: Value of _connection.pool.num.helper.threads_. - -* `DHIS2_CONNECTION_POOL_PREFERRED_TEST_QUERY`: Value of _connection.pool.preferred.test.query_. - -Added in 2.35.8, 2.36.7, 2.37.0: - -* `DHIS2_LOGGING_REQUEST_ID_ENABLED`: Value of _logging.request_id.enabled_. - -* `DHIS2_LOGGING_REQUEST_ID_HASH`: Value of _logging.request_id.hash_; Removed in 2.38.0. - -* `DHIS2_LOGGING_REQUEST_ID_MAX_SIZE`: Value of _logging.request_id.max_size_; Removed in 2.38.0. - -Added in 2.35.14, 2.36.11, 2.37.7: - -* `DHIS2_AUDIT_LOGGER_FILE_MAX_SIZE`: Value of _audit.logger.file.max_size_. - -Added in 2.36.0: - -* `DHIS2_CONNECTION_POOL_TIMEOUT`: Value of _connection.pool.timeout_. - -* `DHIS2_CONNECTION_POOL_VALIDATION_TIMEOUT`: Value of _connection.pool.validation_timeout_. - -* `DHIS2_DB_POOL_TYPE`: Value of _db.pool.type_. - -* `DHIS2_ELAPSED_TIME_QUERY_LOGGING_ENABLED`: Value of _elapsed.time.query.logging.enabled_. - -* `DHIS2_ENABLE_QUERY_LOGGING`: Value of _enable.query.logging_. - -* `DHIS2_METHOD_QUERY_LOGGING_ENABLED`: Value of _method.query.logging.enabled_. - -* `DHIS2_OIDC_PROVIDER_GOOGLE_REDIRECT_URL`: Value of _oidc.provider.google.redirect_url_. - -* `DHIS2_OIDC_PROVIDER_WSO2_REDIRECT_URL`: Value of _oidc.provider.wso2.redirect_url_. - -* `DHIS2_SLOW_QUERY_LOGGING_THRESHOLD_TIME`: Value of _slow.query.logging.threshold.time_. - -* `DHIS2_SYSTEM_AUDIT_ENABLED`: Value of _system.audit.enabled_. - -* `DHIS2_SYSTEM_CACHE_MAX_SIZE_FACTOR`: Value of _system.cache.max_size.factor_. - -* `DHIS2_TRACKER_IMPORT_PREHEAT_CACHE_ENABLED`: Value of _tracker.import.preheat.cache.enabled_; - Removed in 2.38.0. - -Added in 2.36.3, 2.37.0: - -* `DHIS2_OAUTH2_AUTHORIZATION_SERVER_ENABLED`: Value of _oauth2.authorization.server.enabled_. - -* `DHIS2_OIDC_JWT_TOKEN_AUTHENTICATION_ENABLED`: Value of _oidc.jwt.token.authentication.enabled_. - -Added in 2.36.12.1, 2.37.8.1, 2.38.2.1: - -* `DHIS2_CSP_ENABLED`: Value of _csp.enabled_. - -* `DHIS2_CSP_HEADER_VALUE`: Value of _csp.header.value_. - -* `DHIS2_CSP_UPGRADE_INSECURE_ENABLED`: Value of _csp.upgrade.insecure.enabled_. - -Added in 2.37.0: - -* `DHIS2_DEBEZIUM_CONNECTION_PASSWORD`: Value of _debezium.connection.password_. - -* `DHIS2_DEBEZIUM_CONNECTION_USERNAME`: Value of _debezium.connection.username_. - -* `DHIS2_DEBEZIUM_DB_HOSTNAME`: Value of _debezium.db.hostname_. - -* `DHIS2_DEBEZIUM_DB_NAME`: Value of _debezium.db.name_. - -* `DHIS2_DEBEZIUM_DB_PORT`: Value of _debezium.db.port_. - -* `DHIS2_DEBEZIUM_ENABLED`: Value of _debezium.enabled_. - -* `DHIS2_DEBEZIUM_EXCLUDE_LIST`: Value of _debezium.exclude.list_. - -* `DHIS2_DEBEZIUM_SHUTDOWN_ON_CONNECTOR_STOP`: Value of _debezium.shutdown_on.connector_stop_. - -* `DHIS2_DEBEZIUM_SLOT_NAME`: Value of _debezium.slot.name_. - -* `DHIS2_ENABLE_API_TOKEN_AUTHENTICATION`: Value of _enable.api_token.authentication_. - -* `DHIS2_SYSTEM_CACHE_CAP_PERCENTAGE`: Value of _system.cache.cap.percentage_. - -Added in 2.38.0: - -* `DHIS2_AUDIT_IN_MEMORY-QUEUE_ENABLED`: Value of _audit.in_memory-queue.enabled_. - -* `DHIS2_MAX_SESSIONS_PER_USER`: Value of _max.sessions.per_user_. - -* `DHIS2_SYSTEM_UPDATE_NOTIFICATIONS_ENABLED`: Value of _system.update_notifications_enabled_. - -Added in 2.38.2, 2.39.0: - -* `DHIS2_HIBERNATE_CACHE_USE_QUERY_CACHE`: Value of _hibernate.cache.use_query_cache_. - -* `DHIS2_HIBERNATE_CACHE_USE_SECOND_LEVEL_CACHE`: Value of _hibernate.cache.use_second_level_cache_. - -* `DHIS2_REDIS_CACHE_INVALIDATION_ENABLED`: Value of _redis.cache.invalidation.enabled_. - - -### Removed options - -Removed in 2.35.1, 2.36.0: - -* `DHIS2_OIDC_PROVIDER_GOOGLE_REDIRECT_BASEURL`: Value of _oidc.provider.google.redirect_baseurl_. - Introduced in 2.35.0 or earlier. - -Removed in 2.35.8, 2.36.7, 2.37.0: - -* `DHIS2_MONITORING_REQUESTIDLOG_ENABLED`: Value of _monitoring.requestidlog.enabled_. Introduced in - 2.35.0 or earlier. - -* `DHIS2_MONITORING_REQUESTIDLOG_HASH`: Value of _monitoring.requestidlog.hash_. Introduced in - 2.35.0 or earlier. - -* `DHIS2_MONITORING_REQUESTIDLOG_MAXSIZE`: Value of _monitoring.requestidlog.maxsize_. Introduced in - 2.35.0 or earlier. - -Removed in 2.36.0: - -* `DHIS2_SYSTEM_INTERNAL_SERVICE_API`: Value of _system.internal_service_api_. Introduced in 2.35.0 - or earlier. - -Removed in 2.38.0: - -* `DHIS2_AUDIT_IN_MEMORY_QUEUE_ENABLED`: Value of _audit.in_memory_queue.enabled_. Introduced in - 2.35.4, 2.36.0. - -* `DHIS2_AUDIT_INMEMORY-QUEUE_ENABLED`: Value of _audit.inmemory-queue.enabled_. Introduced in - 2.35.0 or earlier. - -* `DHIS2_LOGGING_REQUEST_ID_HASH`: Value of _logging.request_id.hash_. Introduced in 2.35.8, 2.36.7, - 2.37.0. - -* `DHIS2_LOGGING_REQUEST_ID_MAX_SIZE`: Value of _logging.request_id.max_size_. Introduced in 2.35.8, - 2.36.7, 2.37.0. - -* `DHIS2_MONITORING_PROVIDER`: Value of _monitoring.provider_. Introduced in 2.35.0 or earlier. - -* `DHIS2_TRACKER_IMPORT_PREHEAT_CACHE_ENABLED`: Value of _tracker.import.preheat.cache.enabled_. - Introduced in 2.36.0. +Any option defined in +[ConfigurationKey.java](https://github.com/dhis2/dhis2-core/blob/master/dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/conf/ConfigurationKey.java) +for the version fo DHIS2 can be set with an environment variable by transforming all letters to +uppercase and changing all special periods to underscores. For example, to set +_analytics.cache.expiration_ in dhis.conf, set value for `DHIS2_ANALYTICS_CACHE_EXPIRATION` in the +environment. Similarly, for _oidc.provider.google.client_secret_, set +`DHIS2_OIDC_PROVIDER_GOOGLE_CLIENT_SECRET`. ## Generating Tomcat server.xml