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 Like

Sorry for replying to such an old topic. Did you ever manage to get this to work? My use case is wanting to do some tests with setting up a network of Discourse sites, where some of the sites are functioning as DiscourseConnect providers and other sites are functioning as DiscourseConnect clients. I can setup multiple production sites for this, but it would be great to be able to have the sites on my local computer.

It’ll be really hard to get DiscourseConnect to work (at least as the source, which needs a URL) to work in development. If you’re good at those DNS games (like routing those in through your firewall?), then nothing is stopping you from running multiple production sites on your local machine.

1 Like

I’m not :slight_smile: I’ll stick with testing on production sites.

1 Like