HomePhabricator
Diffusion Comm 5d81dfee8b6e

[keyserver] Introduce getDBConfig that can source from environmental variables

Description

[keyserver] Introduce getDBConfig that can source from environmental variables

Summary:

  • As we Dockerize the keyserver, we need to make it possible to define config via environmental variables.
  • In most of those cases, we can define the entire JSON file as an environmental variable.
  • But for the case of the DB config, we'd like to be able to share a config style with the mysql Docker image, which uses separate environmental variables for each key
  • So we're going to special-case DB config here
  • The rest of the configs will be handled through importJSON in a following diff

Depends on D4025

Test Plan:

  1. Test to make sure the keyserver still runs and can load the website with db_config.json defined
  2. Test to make sure scripts that need DB access (such as reset-password.js) still runs with db_config.json defined
  3. In combination with a later diff I'll make sure to test that the environmental variables work too

Reviewers: palys-swm, atul

Reviewed By: palys-swm, atul

Subscribers: Adrian, yayabosh

Differential Revision: https://phabricator.ashoat.com/D4097

Details

Provenance
ashoatAuthored on May 12 2022, 7:11 PM
Reviewer
tomek
Differential Revision
D4097: [keyserver] Introduce getDBConfig that can source from environmental variables
Parents
rCOMMcaf53532f1f8: [keyserver] Use importJSON to import olm_config.json
Branches
Unknown
Tags
Unknown