I have a Procfile that I use with Foreman to start my local redis and webrick server:
web: bundle exec rails server -p $PORT
redis: redis-server config/redis.development.conf
I connect to Redis using a named socket that is defined in the configuration like this:
unixsocket /tmp/redis-APPNAME.sock
Everything works fine in Rails, but when I hit CTRL+C to terminate Foreman in the terminal, the Redis DB is not dumped. The Redis server is terminated by SIGINT
this way. So, whenever I restart the Foreman stack I get old Redis data.
Is there a way to tell Foreman to use the proper SHUTDOWN on Redis that will also dump the database? Or should I modify the Redis config to persist data all the time in development?