Skip to content

Add stop-services-on-localnet.sh teardown script#109

Open
finnfujimura wants to merge 2 commits into
mainfrom
add-stop-services-script
Open

Add stop-services-on-localnet.sh teardown script#109
finnfujimura wants to merge 2 commits into
mainfrom
add-stop-services-script

Conversation

@finnfujimura
Copy link
Copy Markdown

Tears down everything started by run-services-on-localnet.sh:

  1. The three Dockerized services (faucet, maker-bot, taker-bot)
  2. The backgrounded solana-test-validator

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a teardown script to stop the localnet stack started by services/run-services-on-localnet.sh, covering both Docker Compose services and the backgrounded Solana test validator.

Changes:

  • Add services/stop-services-on-localnet.sh to docker compose down the faucet/maker-bot/taker-bot services.
  • Add logic to detect and stop a running solana-test-validator process.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread services/stop-services-on-localnet.sh Outdated
Comment thread services/stop-services-on-localnet.sh
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 29, 2026 21:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a teardown helper script to stop the Dockerized localnet services and terminate the locally running Solana test validator that may have been started by run-services-on-localnet.sh.

Changes:

  • Add services/stop-services-on-localnet.sh to docker compose down the faucet/maker-bot/taker-bot stacks.
  • Add logic to detect and terminate solana-test-validator when running.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


if pgrep -x solana-test-validator >/dev/null; then
echo "Stopping solana-test-validator..."
pkill -x solana-test-validator
Comment on lines +20 to +25
if pgrep -x solana-test-validator >/dev/null; then
echo "Stopping solana-test-validator..."
pkill -x solana-test-validator
else
echo "No solana-test-validator process running."
fi
Comment on lines +12 to +26
for svc in faucet maker-bot taker-bot; do
compose_file="services/$svc/compose.yaml"
if [ -f "$compose_file" ]; then
echo "Stopping $svc..."
docker compose -f "$compose_file" down --remove-orphans
fi
done

if pgrep -x solana-test-validator >/dev/null; then
echo "Stopping solana-test-validator..."
pkill -x solana-test-validator
else
echo "No solana-test-validator process running."
fi

@alnoki
Copy link
Copy Markdown
Contributor

alnoki commented Apr 30, 2026

@finnfujimura I notice that this isn't referenced in a package.json script or similar, so how about adding it to an applicable README?

Once you add this in and after you've addressed reviews from Copilot and @val-levy, then I'm guessing it'll be good to merge since it's pretty straightforward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants