问题描述
我正在尝试使用设置数据库。我知道这是可能的,但是除了设置一个ENV变量之外,似乎没有任何关于如何执行此操作的文档。我如何设置一个MongoDB或Cassandra docker容器,然后部署,并让我的deis应用程序使用它?
I'm trying to setup a database with Deis. I know this is possible, but there doesn't seem to be any documentation about how to do it other than setting an ENV variable.How could I setup say a MongoDB or Cassandra docker container and then deploy that and have my deis app use it?
推荐答案
如果您现在正在部署,一个可能的解决方案是设置一个docker容器,将其公开路由然后通过环境变量使用该容器Heroku的 12因素应用程序最佳做法。有一个的功能要求将像Heroku的附加组件市场一样,但它不在还有。
If you're trying to deploy now, a possible solution is to set up a docker container, have it publicly route-able, and then configure your application to use that container through an environment variable following Heroku's 12 factor app best practices. There is a feature request for a Deis service gateway that will act like Heroku's Add-on Marketplace, but it's not there yet.
这篇关于如何使用Deis(PaaS)设置和部署数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!