From bc52e9643642151eec8ce95f6567d5304bb93e12 Mon Sep 17 00:00:00 2001 From: koalasat Date: Tue, 15 Oct 2024 11:34:12 +0200 Subject: [PATCH] Fix supervisord --- compose/docker-compose.override-lnd.yml | 3 ++- compose/env-sample/lndtn/compose.env | 1 + compose/env-sample/lndtn/supervisord.conf | 24 +++++++++++++++++++++++ compose/env-sample/lndtn/torrc | 2 +- 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 compose/env-sample/lndtn/supervisord.conf diff --git a/compose/docker-compose.override-lnd.yml b/compose/docker-compose.override-lnd.yml index 2b2cf1e..2990181 100644 --- a/compose/docker-compose.override-lnd.yml +++ b/compose/docker-compose.override-lnd.yml @@ -51,6 +51,7 @@ services: restart: always container_name: lndg${SUFFIX} volumes: + - ${LND_CONFIG}:/root/supervisord.conf:ro - ${LND_DATA}:/root/.lnd:ro - ${LNDG_DATA}:/lndg/data:rw depends_on: @@ -59,7 +60,7 @@ services: command: - sh - -c - - python initialize.py -net ${NETWORK} -dir /root/.lnd -rpc 127.0.0.1:${GUEST_LND_RPC_PORT:?} -u ${LNDG_USER:?} -pw ${LNDG_PASSWORD:?} -d && supervisord && python manage.py runserver 0.0.0.0:8889 + - python initialize.py -net ${NETWORK} -dir /root/.lnd -rpc 127.0.0.1:${GUEST_LND_RPC_PORT:?} -u ${LNDG_USER:?} -pw ${LNDG_PASSWORD:?} -d && supervisord -c /root/supervisord.conf && python manage.py runserver 0.0.0.0:8889 network_mode: service:tor # Patch common services diff --git a/compose/env-sample/lndtn/compose.env b/compose/env-sample/lndtn/compose.env index 3c889e6..ec01fc6 100644 --- a/compose/env-sample/lndtn/compose.env +++ b/compose/env-sample/lndtn/compose.env @@ -62,6 +62,7 @@ THUB_ACCOUNTS='./env/lndtn/thunderhub-accounts.yml' # THUB_ACCOUNTS_CONFIG_PATH must match thub...env THUB_ACCOUNTS_CONFIG_PATH='/config/accounts.yml' +LNDG_CONFIG='/custom_path/testnet/lndg/config' LNDG_DATA='/custom_path/testnet/lndg/data' LNDG_USER='lndg-admin' LNDG_PASSWORD=999999999 diff --git a/compose/env-sample/lndtn/supervisord.conf b/compose/env-sample/lndtn/supervisord.conf new file mode 100644 index 0000000..157a6e1 --- /dev/null +++ b/compose/env-sample/lndtn/supervisord.conf @@ -0,0 +1,24 @@ +[supervisord] +user=root +childlogdir = /var/log +logfile = /var/log/supervisord.log +logfile_maxbytes = 50MB +logfile_backups = 30 +loglevel = info +pidfile = /var/supervisord.pid +umask = 022 +nodaemon = false +nocleanup = false + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface + +[program:controller] +command = sh -c "python controller.py && sleep 15" +process_name = lndg-controller +directory = /app +autorestart = true +redirect_stderr = true +stdout_logfile = /var/log/lndg-controller.log +stdout_logfile_maxbytes = 150MB +stdout_logfile_backups = 15 diff --git a/compose/env-sample/lndtn/torrc b/compose/env-sample/lndtn/torrc index d8881ed..fbbf5cd 100644 --- a/compose/env-sample/lndtn/torrc +++ b/compose/env-sample/lndtn/torrc @@ -17,7 +17,7 @@ HiddenServiceVersion 3 HiddenServicePort 80 127.0.0.1:80 # Robosats Admin Testnet Onion Service -HiddenServiceDir /var/lib/tor/satstralia-admin/ +HiddenServiceDir /var/lib/tor/robotest-admin/ HiddenServiceVersion 3 HiddenServicePort 80 127.0.0.1:80