Changeset View
Changeset View
Standalone View
Standalone View
nix/redis-up-mac.nix
Show All 9 Lines | redis-entrypoint = writeShellApplication { | ||||
name = "redis-init"; | name = "redis-init"; | ||||
text = '' | text = '' | ||||
REDIS_CACHE_DIR=''${XDG_CACHE_HOME:-$HOME/Library/Caches}/Redis | REDIS_CACHE_DIR=''${XDG_CACHE_HOME:-$HOME/Library/Caches}/Redis | ||||
mkdir -p "$REDIS_CACHE_DIR" | mkdir -p "$REDIS_CACHE_DIR" | ||||
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 | ||||
# 'exec' allows for us to replace bash process with MariaDB | # Explicitly close fd3 to prevent `direnv` from hanging | ||||
# (https://linear.app/comm/issue/ENG-3254/remove-wait-logic-in-nix-develop) | |||||
exec 3>&- | |||||
# 'exec' allows for us to replace bash process with Redis | |||||
atul: Snuck in a little typo fix here too | |||||
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 | ||||
in writeShellApplication { | in writeShellApplication { | ||||
Show All 19 Lines |
Snuck in a little typo fix here too