Multiple development instances

On my development box, I find myself needing multiple instances. One site I’m importing is on stable, others use importers that I am developing. Right now what I do is when switching jobs, I switch branches in git and run a script that does

RAILS_ENV=development
export RAILS_ENV
RAILS_ENV=development bundle exec rake db:drop db:create db:migrate
bundle exec rake admin:create

It’s really annoying when I’ve, say, run an importer that takes several hours and then want to run it again with updated input (and not have to re-import the whole thing).

Is there something different I should be doing? Perhaps I should run separate instances with Vagrant? Contrive to tell Discourse to use a different database for each different job?

Or am I doing the Right Thing?

1 个赞

抱歉回复如此古老的话题。你最后有没有成功实现这个功能?我的用例是想在设置 Discourse 站点网络时进行一些测试,其中一些站点将作为 DiscourseConnect 提供商,而其他站点将作为 DiscourseConnect 客户端。我可以为这个设置多个生产站点,但如果能在我的本地计算机上运行这些站点就太好了。

在开发中让 DiscourseConnect(至少作为需要 URL 的源)正常工作会非常困难。如果你擅长那些 DNS 游戏(比如通过防火墙路由它们?),那么没有什么能阻止你在本地计算机上运行多个生产站点。

1 个赞

我不是 :slight_smile: 我将继续在生产网站上进行测试。

1 个赞