Use an external database
Sometimes, you may want to have the chart use an external database rather than using the one bundled with the chart. Common use cases include using a managed database service, or using a single database server for all your applications. This chart supports external databases through its externalDatabase.* parameters.
When using these parameters, it is necessary to disable installation of the bundled PostgreSQL database using the postgresql.enabled=false parameter.
An example of the parameters set when deploying the chart with an external database are shown below:
postgresql.enabled=false
externalDatabase.host=myexternalhost
externalDatabase.port=5432
externalDatabase.user=myuser
externalDatabase.password=mypassword
externalDatabase.database=mydatabase
externalDatabase.postgresqlPostgresUser=postgres
externalDatabase.postgresqlPostgresPassword=rootpassword
In case the database already contains data from a previous Discourse installation, you need to set the discourse.skipInstall parameter to true. Otherwise, the container would execute the installation wizard and could modify the existing data in the database. This parameter forces the container to not execute the Discourse installation wizard.
Similarly, you can specify an external Redis(TM) instance rather than installing one inside your cluster. First, you may disable the Redis(TM) installation with the redis.enabled option. As described previously, use the parameters below to provide data about your instance:
redis.enabled=false
externalRedis.host=myexternalhost
externalRedis.password=mypassword
externalRedis.port=5432