Persist custom config settings across restarts
Persist custom config settings across restarts

This patch ensures that configuration properties set using the _config
endpoint survive container restarts. Previously these settings would be
erased by the code in the entrypoint that writes down the admin user
and cookie auth secret.

The patch also takes care to ensure that the admin user and secret are
not accidentally left on the disk in plaintext -- i.e., it ensures that
the entrypoint writes these settings into the last entry in the config
chain.

Finally, the patch ensures that local.d is always used to store custom
configuration. Backing local.d by a persistent volume should allow for
the config properties to survive a Pod being rescheduled onto another
node by Kubernetes.

apache/couchdb-docker