OpenShift seems to encourage developers to push a repo directly to OpenShift, which is pretty convenient. If an application (using node.js, but that probably doesn't matter much for this question) has mostly public files, but a few private files for things like DB passwords, external api keys, license keys, New Relic config, etc., what is the recommended way of deploying?

One idea that comes to mind is to have 1 public repo, 1 private repo, and a deploy script that puts everything together, commits to a separate private deploy repo, and then push that deploy repo to OpenShift.

This seems like it would be a common use case though, so perhaps the deploy script with extra repo is unnecessary if OpenShift already has a process for this.

有帮助吗?

解决方案

The recommended way is to use environment variables for things like db passwords and keys. And unless you are also copying your code to a public github repo, then everything you push to your OpenShift hosted git repo is private to just you.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top