mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-01-31 18:24:26 +01:00
Small fixes here and there
This commit is contained in:
@@ -9,7 +9,7 @@ services:
|
||||
postgres:
|
||||
image: postgres:<%= postgres_version %>
|
||||
user: $USER
|
||||
entrypoint: sh -c 'rm -f /container_monitor/postgres_ready ; docker-entrypoint.sh -c logging_collector=true -c log_directory=/cnlogs/'
|
||||
entrypoint: sh -c 'rm -f /container_monitor/postgres_ready ; exec docker-entrypoint.sh -c logging_collector=true -c log_directory=/cnlogs/'
|
||||
environment:
|
||||
- "POSTGRES_USER=cyphernode"
|
||||
- "POSTGRES_PASSWORD=<%= postgres_password %>"
|
||||
@@ -49,8 +49,8 @@ services:
|
||||
|
||||
tor:
|
||||
image: cyphernode/tor:<%= tor_version %>
|
||||
# Sleeping 7 seconds to let lightning and traefik start
|
||||
command: $USER sh -c 'rm -f /container_monitor/tor_ready ; sleep 10 ; export HOME=/tor ; tor -f /tor/torrc'
|
||||
# Sleeping 10 seconds to let lightning and traefik start
|
||||
command: $USER sh -c 'rm -f /container_monitor/tor_ready ; sleep 10 ; export HOME=/tor ; exec tor -f /tor/torrc'
|
||||
volumes:
|
||||
- "<%= tor_datapath %>:/tor"
|
||||
- container_monitor:/container_monitor
|
||||
@@ -129,7 +129,7 @@ services:
|
||||
|
||||
bitcoin:
|
||||
image: cyphernode/bitcoin:<%= bitcoin_version %>
|
||||
command: $USER /.bitcoin/entrypoint.sh
|
||||
command: $USER /.bitcoin/entrypoint.sh
|
||||
<% if( bitcoin_expose ) { %>
|
||||
ports:
|
||||
- "<%= (net === 'regtest') ? '18444:18444' : ((net === 'testnet') ? '18333:18333' : '8333:8333') %>"
|
||||
|
||||
@@ -84,9 +84,7 @@ checkpostgres() {
|
||||
echo -en "\r\n\e[1;36mTesting Postgres... " > /dev/console
|
||||
local rc
|
||||
|
||||
# getbatcher needs the database to return correctly...
|
||||
# rc=$(curl -s -o /dev/null -w "%{http_code}" http://proxy:8888/getbatcher)
|
||||
pg_isready -h postgres
|
||||
pg_isready -h postgres -U cyphernode
|
||||
[ "${?}" -ne "0" ] && return 105
|
||||
|
||||
echo -e "\e[1;36mPostgres rocks!" > /dev/console
|
||||
@@ -112,7 +110,6 @@ checknotifier() {
|
||||
local returncode
|
||||
|
||||
nc -vlp1111 -e sh -c 'echo -en "HTTP/1.1 200 OK\\r\\n\\r\\n" ; date >&2 ; timeout 1 tee /dev/tty | cat ; ' &
|
||||
# response=$(mosquitto_rr -h broker -W 15 -t notifier -e "response/$$" -m "{\"response-topic\":\"response/$$\",\"cmd\":\"web\",\"url\":\"http://proxy:8888/helloworld\",\"tor\":false}")
|
||||
response=$(mosquitto_rr -h broker -W 15 -t notifier -e "response/$$" -m "{\"response-topic\":\"response/$$\",\"cmd\":\"web\",\"url\":\"http://$(hostname):1111/notifiertest\",\"tor\":false}")
|
||||
returncode=$?
|
||||
[ "${returncode}" -ne "0" ] && return 115
|
||||
|
||||
@@ -20,7 +20,7 @@ do_callbacks() {
|
||||
fi
|
||||
|
||||
# Let's fetch all the watching addresses still being watched but not called back
|
||||
local callbacks=$(sql "SELECT DISTINCT w.callback0conf, address, txid, vout, amount, confirmations, timereceived, fee, size, vsize, blockhash, blockheight, blocktime, w.id, is_replaceable::text, pub32_index, pub32, w32.label, derivation_path, event_message, hash FROM watching w LEFT JOIN watching_tx ON w.id = watching_id LEFT JOIN tx ON tx.id = tx_id LEFT JOIN watching_by_pub32 w32 ON w.watching_by_pub32_id = w32.id WHERE NOT calledback0conf AND watching_id IS NOT NULL AND w.callback0conf IS NOT NULL AND w.watching${txid_where}")
|
||||
local callbacks=$(sql "SELECT DISTINCT w.callback0conf, address, txid, vout, amount, confirmations, timereceived, fee, size, vsize, blockhash, blockheight, blocktime, w.id, is_replaceable::text, pub32_index, pub32, w.label, derivation_path, event_message, hash FROM watching w LEFT JOIN watching_tx ON w.id = watching_id LEFT JOIN tx ON tx.id = tx_id LEFT JOIN watching_by_pub32 w32 ON w.watching_by_pub32_id = w32.id WHERE NOT calledback0conf AND watching_id IS NOT NULL AND w.callback0conf IS NOT NULL AND w.watching${txid_where}")
|
||||
trace "[do_callbacks] callbacks0conf=${callbacks}"
|
||||
|
||||
local returncode
|
||||
@@ -39,7 +39,7 @@ do_callbacks() {
|
||||
fi
|
||||
done
|
||||
|
||||
callbacks=$(sql "SELECT DISTINCT w.callback1conf, address, txid, vout, amount, confirmations, timereceived, fee, size, vsize, blockhash, blockheight, blocktime, w.id, is_replaceable::text, pub32_index, pub32, w32.label, derivation_path, event_message, hash FROM watching w JOIN watching_tx wt ON w.id = wt.watching_id JOIN tx t ON wt.tx_id = t.id LEFT JOIN watching_by_pub32 w32 ON watching_by_pub32_id = w32.id WHERE NOT calledback1conf AND confirmations>0 AND w.callback1conf IS NOT NULL AND w.watching${txid_where}")
|
||||
callbacks=$(sql "SELECT DISTINCT w.callback1conf, address, txid, vout, amount, confirmations, timereceived, fee, size, vsize, blockhash, blockheight, blocktime, w.id, is_replaceable::text, pub32_index, pub32, w.label, derivation_path, event_message, hash FROM watching w JOIN watching_tx wt ON w.id = wt.watching_id JOIN tx t ON wt.tx_id = t.id LEFT JOIN watching_by_pub32 w32 ON watching_by_pub32_id = w32.id WHERE NOT calledback1conf AND confirmations>0 AND w.callback1conf IS NOT NULL AND w.watching${txid_where}")
|
||||
trace "[do_callbacks] callbacks1conf=${callbacks}"
|
||||
|
||||
for row in ${callbacks}
|
||||
|
||||
@@ -35,7 +35,7 @@ else
|
||||
fi
|
||||
|
||||
trace "[startproxy] Waiting for PostgreSQL to be ready..."
|
||||
while [ ! -f "/container_monitor/postgres_ready" ]; do echo "PostgreSQL not ready" ; sleep 10 ; done
|
||||
while [ ! -f "/container_monitor/postgres_ready" ]; do trace "[startproxy] PostgreSQL not ready" ; sleep 10 ; done
|
||||
trace "[startproxy] PostgreSQL ready!"
|
||||
|
||||
if [ ! -e ${DB_FILE} ]; then
|
||||
|
||||
Reference in New Issue
Block a user