Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow custom ports in sandbox #2393

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/dev_docs/getting_started/sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ It will download and execute a script invoking docker compose with 2 containers:
- Anvil
- Aztec Sandbox

It will need to create servers on localhost ports 8545 (Anvil) and 8080 (Sandbox) so you will need to ensure nothing conflicts with this.
2 ports will need to be opened on your system in order for you to interact with the sandbox. The first port is for Anvil, it defaults to 8545 and can be overridden by specifying a value in the environment variable `SANDBOX_ANVIL_PORT`. The second is the sandbox RPC host port. It defaults to value 8080 but can be overridden with environment variable `SANDBOX_RPC_PORT`.

Within a few seconds the Sandbox should be up and running!

Expand Down
4 changes: 2 additions & 2 deletions yarn-project/aztec-sandbox/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ services:
image: ghcr.io/foundry-rs/foundry:v1.0.0
command: '"anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337"'
ports:
- '8545:8545'
- '${SANDBOX_ANVIL_PORT:-8545}:8545'

aztec:
image: 'aztecprotocol/aztec-sandbox:${SANDBOX_VERSION:-latest}'
ports:
- '8080:8080'
- '${SANDBOX_RPC_PORT:-8080}:8080'
environment:
DEBUG: # Loaded from the user shell if explicitly set
HOST_WORKDIR: '${PWD}' # Loaded from the user shell to show log files absolute path in host
Expand Down