Skip to content

Commit

Permalink
fix(justfile): Allow just maker to be run on Linux too
Browse files Browse the repository at this point in the history
  • Loading branch information
luckysori committed Feb 19, 2024
1 parent 5521213 commit 9198125
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,19 @@ coordinator args="":

cargo run --bin coordinator -- {{args}}

run_maker_args := if os() == "linux" {
"--network=\"host\" --pull always --name maker ghcr.io/get10101/aristides/aristides:main regtest --orderbook http://localhost:8000"
} else if os() == "macos" {
"--pull always --name maker ghcr.io/get10101/aristides/aristides:main regtest --orderbook http://host.docker.internal:8000"
} else {
"echo 'Only linux and macos are supported';
exit"
}

maker args="":
# we always delete the old container first as otherwise we might get an error if the container still exists
docker rm -f maker || true
docker run --pull always --name maker ghcr.io/get10101/aristides/aristides:main regtest --orderbook http://host.docker.internal:8000
docker run {{run_maker_args}}

flutter-test:
cd mobile && flutter pub run build_runner build --delete-conflicting-outputs && flutter test
Expand Down Expand Up @@ -340,6 +349,15 @@ run-coordinator-detached:
just wait-for-coordinator-to-be-ready
echo "Coordinator successfully started. You can inspect the logs at {{coordinator_log_file}}"
run_maker_detached_args := if os() == "linux" {
"--network=\"host\" --pull always -d --name maker ghcr.io/get10101/aristides/aristides:main regtest --orderbook http://localhost:8000"
} else if os() == "macos" {
"--pull always -d --name maker ghcr.io/get10101/aristides/aristides:main regtest --orderbook http://host.docker.internal:8000"
} else {
"echo 'Only linux and macos are supported';
exit"
}
# Starts maker process in the background, piping logs to a file (used in other recipes)
run-maker-detached:
# we always delete the old container first as otherwise we might get an error if the container still exists
Expand Down

0 comments on commit 9198125

Please sign in to comment.