From 1db78588b52eab47bc7c614496a8b22c9bf3b42d Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Mon, 9 Oct 2023 10:08:24 -0700 Subject: [PATCH] Manage history-archive http server with supervisor (#507) --- .../etc/supervisord.conf.d/history-archive.conf | 9 +++++++++ start | 5 +---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 local/supervisor/etc/supervisord.conf.d/history-archive.conf diff --git a/local/supervisor/etc/supervisord.conf.d/history-archive.conf b/local/supervisor/etc/supervisord.conf.d/history-archive.conf new file mode 100644 index 00000000..e298d3ac --- /dev/null +++ b/local/supervisor/etc/supervisord.conf.d/history-archive.conf @@ -0,0 +1,9 @@ +[program:history-archive] +user=stellar +directory=/tmp/stellar-core/history/vs +command=/usr/bin/python3 -m http.server 1570 +autostart=true +autorestart=true +startretries=100 +priority=10 +redirect_stderr=true diff --git a/start b/start index 43a70761..b9e3e269 100644 --- a/start +++ b/start @@ -233,6 +233,7 @@ function copy_defaults() { cp /opt/stellar-default/$NETWORK/supervisor/etc/supervisord.conf.d/soroban-rpc.conf $SUPHOME/etc/supervisord.conf.d 2>/dev/null || true fi cp /opt/stellar-default/$NETWORK/supervisor/etc/supervisord.conf.d/friendbot.conf $SUPHOME/etc/supervisord.conf.d 2>/dev/null || true + cp /opt/stellar-default/$NETWORK/supervisor/etc/supervisord.conf.d/history-archive.conf $SUPHOME/etc/supervisord.conf.d 2>/dev/null || true fi if [ -d $COREHOME/etc ]; then @@ -367,10 +368,6 @@ function init_stellar_core() { run_silent "init-core-scp" sudo -u stellar stellar-core force-scp --conf etc/stellar-core.cfg run_silent "init-history" sudo -u stellar stellar-core new-hist vs --conf $COREHOME/etc/stellar-core.cfg - # Start local history server - pushd /tmp/stellar-core/history/vs - python3 -m http.server 1570 > /dev/null 2>&1 & - popd fi touch .quickstart-initialized