sillsdev / web-languageforge

Language Forge: Online Collaborative Dictionary Building on the Web and Phone.
https://languageforge.org
MIT License
44 stars 29 forks source link

Kubernetes deployment now requires Mongo auth #1826

Closed rmunn closed 4 months ago

rmunn commented 5 months ago

This is a followup to https://github.com/sillsdev/web-languageforge/pull/1813.

The MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD variables, if they exist when the MongoDB container is started up, will be used to tell MongoDB to start in auth-required mode. If there is an existing database then the value of these env vars doesn't matter and the usernames and passwords from the existing database will be used instead, but if the database is empty then these two env vars are used to set up an initial administrator account that can access and change anything, and the DB setup scripts are then expected to create any other required users. Since we now have authentication defined in Mongo, we can turn this on by default and everything will continue to work.

This has already been done manually (via the Rancher control panel) on staging and production; this PR simply adds the required environment variables to the depoyment file so that if anyone runs make deploy-staging or make deploy-prod in the future, the deployment will not remove those environment variables.

github-actions[bot] commented 5 months ago

Unit Test Results

362 tests   362 :white_check_mark:  13s :stopwatch:  37 suites    0 :zzz:   1 files      0 :x:

Results for commit eb0fed13.