Skip to content

Commit

Permalink
Manage history-archive http server with supervisor (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch authored Oct 9, 2023
1 parent 140ee88 commit 1db7858
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 9 additions & 0 deletions local/supervisor/etc/supervisord.conf.d/history-archive.conf
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1db7858

Please sign in to comment.