Redis in development
Quick note for my future self :)
During Rails development for my sideproject DrawColors, I've added Redis to the stack.
To make it easy on myself, the server starts when running
bin/dev, by adding
redis-server to the Procfile.dev.
Redis stores the database dump on the disk, in a
dump.rdb file. Annoyingly that's stored in the app root directory. I don't want that and don't want to commit it into git either, so previously added it to the
Move Redis dump.rdb file
A way easier solution is to move the dump.rdb file to a different directory. Redis supports this by adjusting the
redis.conf file. BUT, that's another file which feels like "overhead" and since I'm using the Procfile.dev to start the server.... Could we update the command when starting the
YES ... WE ... CAN!
redis: redis-server --dir /tmp
And voila! The dump.rdb file is now stored in the
© 2024 -- Jeroen Roosenboom