forked from mempool/mempool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mempool-start-all
executable file
·36 lines (30 loc) · 1.07 KB
/
mempool-start-all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env zsh
export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
nvm use v20.7.0
# start all mempool backends that exist
for site in mainnet mainnet-lightning testnet testnet-lightning signet signet-lightning bisq liquid liquidtestnet;do
cd "${HOME}/${site}/backend/" && \
echo "starting mempool backend: ${site}" && \
screen -dmS "${site}" sh -c 'while true;do npm run start-production;sleep 1;done'
done
export DISPLAY=:0
screen -dmS x startx
sleep 3
# start unfurlers for each frontend
for site in mainnet liquid bisq;do
cd "$HOME/${site}/unfurler" && \
echo "starting mempool unfurler: ${site}" && \
screen -dmS "unfurler-${site}" sh -c 'while true;do npm run unfurler;sleep 2;done'
done
# start nginx warm cacher
for site in mainnet;do
echo "starting mempool cache warmer: ${site}"
screen -dmS "warmer-${site}" $HOME/mempool/production/nginx-cache-warmer
done
# start nginx hot cacher
for site in mainnet;do
echo "starting mempool cache heater: ${site}"
screen -dmS "heater-${site}" $HOME/mempool/production/nginx-cache-heater
done
exit 0