diff --git a/.env.example b/.env.example index 759d01f..8a231f8 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,7 @@ MATOMO_PASSWORD= # For production (optional for others) UPDATE_EFO_BOT_PASSWORD= MW_NCBI_TAXONOMY_API_KEY= +MW_NCBI_TAXONOMY_API_URL= MW_RECAPTCHA_SITE_KEY= MW_RECAPTCHA_SECRET_KEY= RESTIC_PASSWORD= diff --git a/README.md b/README.md index 918722a..53f40f1 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ If changed, ensure corresponding database passwords (`MW_DB_PASS` in the web sec - `MW_LOAD_EXTENSIONS` provided as comma-separated list of MediaWiki extensions to load during container startup - `MW_LOAD_SKINS` comma-separated list of MediaWiki skins available for use - `MW_SEARCH_TYPE` configures the search backend (typically `CirrusSearch`) +- `MW_NCBI_TAXONOMY_API_URL` optionally sets custom URL for the NCBI API endpoint - `MW_NCBI_TAXONOMY_API_KEY`, `MW_RECAPTCHA_SITE_KEY`, `MW_RECAPTCHA_SECRET_KEY` optional/requested third-party API keys - `MW_ENABLE_SITEMAP_GENERATOR` enables sitemap generator script on production (`true/false`) diff --git a/_settings/LocalSettings.php b/_settings/LocalSettings.php index ef86053..7d6311f 100644 --- a/_settings/LocalSettings.php +++ b/_settings/LocalSettings.php @@ -156,6 +156,9 @@ //wfLoadExtension( 'NCBITaxonomyLookup' ); $wgNCBITaxonomyLookupCacheTTL = 1296000; # 15 days +if ( getenv( 'MW_NCBI_TAXONOMY_API_URL' ) ) { + $wgNCBITaxonomyLookupApiURL = getenv( 'MW_NCBI_TAXONOMY_API_URL' ); +} $wgNCBITaxonomyApiKey = getenv( 'MW_NCBI_TAXONOMY_API_KEY' ); $wgNCBITaxonomyApiTimeout = 30; $wgNCBITaxonomyLookupCacheRandomizeTTL = true; diff --git a/compose.yml b/compose.yml index 5fe5884..6d98c79 100644 --- a/compose.yml +++ b/compose.yml @@ -35,6 +35,7 @@ services: - MW_DB_NAME=mediawiki - MW_DB_PASS=${MYSQL_ROOT_PASSWORD?Variable MYSQL_ROOT_PASSWORD not set} - MW_NCBI_TAXONOMY_API_KEY=${MW_NCBI_TAXONOMY_API_KEY:-} + - MW_NCBI_TAXONOMY_API_URL - MW_RECAPTCHA_SITE_KEY=${MW_RECAPTCHA_SITE_KEY:-} - MW_RECAPTCHA_SECRET_KEY=${MW_RECAPTCHA_SECRET_KEY:-} - MW_ADMIN_USER=admin