'How to replicate PSQL DB between containers running in diff hosts

I am deploying an application in server1 using juju charms using localhost cloud. The deployment has two lxc containers app and db. For HA, I just deployed the app in other host server2. I would like to replicate the db containers running in server1 to server2 db container. How can I do it ?

thanks ham.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source