Running PostgreSQL on the main server
Assuming that we will need one PostgreSQL user and database per Greenlight container and we are potentially running multiple Greenlight containers we are probably going to be best off running Postgres on the main server not in Docker as we will need to add and remove accounts without restarting the service whenever we change the number of different Greenlight containers that are running.
In the future a separate PostgreSQL VM might make more sense if and when Scallite is added to the mix.
Xenial ships with PostgreSQL 9.5 which is the right version, the Webarchitects PostgeSQL role might need some updates:
- Check it works with PostgeSQL 9.5 on Xenial (currently it has only been used on Buster which has PostgreSQL 11)
- Potentially update it to support an array of users and databases and only restart the service when needed using a handler (this might not be essential work)
- Nightly database dumps and
rsync
them to a backup server