HomePhabricator
Diffusion Comm 8587565aae95

[nix] Launch `redis-server` from `REDIS_CACHE_DIR`

Description

[nix] Launch redis-server from REDIS_CACHE_DIR

Summary:
Redis will persist application files (eg dump.rdp) to disk from wherever it was launched. We're currently launching from the root of the repo, so I'm constantly getting a dump.rdp in my git working copy which is annoying (as would everyone else if they were actually using Redis/MariaDB via Nix...).

Instead we're cding to $REDIS_CACHE_DIR before launching Redis, so dump.rdp will live there and outside of the root of the repo.

Test Plan: dump.rdp appearing in $REDIS_CACHE_DIR instead of /comm after making this change + killing Redis:

Reviewers: jon, O1 Nix

Reviewed By: jon, O1 Nix

Subscribers: bartek, ashoat, tomek

Differential Revision: https://phab.comm.dev/D7016

Details

Provenance
atulAuthored on Mar 8 2023, 1:25 PM
Reviewer
Restricted Owners Package
Differential Revision
D7016: [nix] Launch `redis-server` from `REDIS_CACHE_DIR`
Parents
rCOMMa245d2e2f38f: [nix] Ensure that fd 3 is closed before we fork `redis-server` and `mariadbd`
Branches
Unknown
Tags
Unknown