Changeset View
Changeset View
Standalone View
Standalone View
nix/redis-up-mac.nix
Show All 13 Lines | text = '' | ||||
echo "View Redis Logs: tail -f $REDIS_CACHE_DIR/logs" >&2 | echo "View Redis Logs: tail -f $REDIS_CACHE_DIR/logs" >&2 | ||||
echo "Kill Redis server: pkill redis" >&2 | echo "Kill Redis server: pkill redis" >&2 | ||||
# Explicitly close fd3 to prevent `direnv` from hanging | # Explicitly close fd3 to prevent `direnv` from hanging | ||||
# (https://linear.app/comm/issue/ENG-3254/remove-wait-logic-in-nix-develop) | # (https://linear.app/comm/issue/ENG-3254/remove-wait-logic-in-nix-develop) | ||||
exec 3>&- | exec 3>&- | ||||
# We want to launch from `$REDIS_CACHE_DIR` so `dump.rdp` will | |||||
# be persisted there instead of in the root of the repo. | |||||
cd "$REDIS_CACHE_DIR" | |||||
# 'exec' allows for us to replace bash process with Redis | # 'exec' allows for us to replace bash process with Redis | ||||
exec ${redis}/bin/redis-server \ | exec ${redis}/bin/redis-server \ | ||||
&> "$REDIS_CACHE_DIR"/logs | &> "$REDIS_CACHE_DIR"/logs | ||||
''; | ''; | ||||
}; | }; | ||||
# will create a shellchecked executable shell script located in $out/bin/<name> | # will create a shellchecked executable shell script located in $out/bin/<name> | ||||
# This shell script will be used to allow for impure+stateful actions | # This shell script will be used to allow for impure+stateful actions | ||||
Show All 20 Lines |