Maybe you’ll think I’m a weird case here, but I don’t… I was really surprised when, after booting Discourse up for the first time on my machine, it obliterated my Redis database. Discourse isn’t the only app I’ve got on my machine that uses Redis; I use it on other personal projects, including projects that I keep development data around for. Thankfully I had a very recent backup, but it made me annoyingly wonder why the attitude seems to be that Discourse owns the Redis instance and that it’s okay to wipe it out on every boot of the Rails environment.
Maybe your answer to this question will be, “Why didn’t you boot up the Vagrant VM?” Sure, I could have done that, but I already have all of the necessary software installed locally. It’s easier for me to just type
bundle install and
rails server and be done with it.
Is it really a problem to have existing data in my Redis database before running Discourse? Does discourse not namespace its Redis data at all? Can we change the “DO_NOT_FLUSH_REDIS” environment variable to something more along the lines of “FLUSH_REDIS”?
I think this could be way friendlier for devs that want to start hacking on Discourse.