Get a working dev environment

This commit is contained in:
asonix 2023-09-21 18:22:11 -05:00
parent 77fa143ca9
commit b06bf1106c
2 changed files with 23 additions and 0 deletions

View file

@ -29,10 +29,12 @@
devShell = with pkgs; mkShell {
nativeBuildInputs = [
icu
imagemagick
libidn
libz
nodejs
postgresql
redis
ruby
yarn
];

21
run-services.sh Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -e
if ! pg_ctl -D ./postgres/15 status; then
pg_ctl -D ./postgres/15 -l ./postgres/postgresql.log start
fi
redis-server > ./redis/redis.log 2> ./redis/redis.err &
echo
echo "Launched postgres and redis"
echo "Hit [enter] to stop services"
read -e
for pid in $(jobs -p); do
kill -9 $pid
done
pg_ctl -D ./postgres/15 stop