Skip to content

Commit

Permalink
Replace redis socket path in backend configs based on OS
Browse files Browse the repository at this point in the history
  • Loading branch information
runbtc committed Dec 6, 2024
1 parent 25d27c5 commit c57cf54
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion production/linux/redis.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
save 3600 1 300 100 60 10000
unixsocket /tmp/redis.sock
unixsocket /var/run/redis/redis.sock
unixsocketperm 666

bind 127.0.0.1 -::1
Expand Down
3 changes: 3 additions & 0 deletions production/mempool-build-all
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ case `uname -s` in

FreeBSD)
DB_SOCKET=/var/run/mysql/mysql.sock
REDIS_SOCKET=/tmp/redis.sock
;;

Linux)
DB_SOCKET=/run/mysqld/mysqld.sock
REDIS_SOCKET=/var/run/redis/redis.sock
;;

esac
Expand Down Expand Up @@ -124,6 +126,7 @@ build_backend()
-e "s!__MEMPOOL_BISQ_USER__!${MEMPOOL_BISQ_USER}!" \
-e "s!__MEMPOOL_BISQ_PASS__!${MEMPOOL_BISQ_PASS}!" \
-e "s!__DB_SOCKET__!${DB_SOCKET}!" \
-e "s!__REDIS_SOCKET__!${REDIS_SOCKET}!" \
"mempool-config.json"
fi
npm install --omit=dev --omit=optional || exit 1
Expand Down
2 changes: 1 addition & 1 deletion production/mempool-config.mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
},
"REDIS": {
"ENABLED": true,
"UNIX_SOCKET_PATH": "/tmp/redis.sock",
"UNIX_SOCKET_PATH": "__REDIS_SOCKET__",
"BATCH_QUERY_BASE_SIZE": 5000
},
"MEMPOOL_SERVICES": {
Expand Down

0 comments on commit c57cf54

Please sign in to comment.