Lukáš Zapletal has just pointed out to me that on Openshift, you can use environment variables to access the Postgresql username, password, and so on. The main blog post has just been updated to reflect the much easier setup instructions. Thanks Lukáš!