id | title | custom_edit_url |
---|---|---|
docker_compose |
Aptos Docker-Compose Configuration |
This directory contains the following compose configurations:
- validator-testnet: creates a single validator test network, and a faucet that directly connects to it
- public_full_node: creates a public fullnode, and it can be configured to connect to any existing network (e.g. testnet, Mainnet).
- monitoring: creates a monitoring stack which can be used to collect metrics and virtulize it on a dashboard. This can be installed together with other compose configurations and provides simple monitoring for the deployment.
- data-restore: creates a aptos db-restore job to restore a data volume from provided S3 bucket. This can be used to quickly restore fullnode for an exsiting blockchain to avoid spending long time on state-sync.
To use these compositions:
- Download and install Docker and Docker Compose (comes with Docker for Mac and Windows).
- Open your favorite terminal and enter the appropriate composition directory
- Run
docker-compose up
To build your own complete testnet:
- Start the validator-testnet and faucet:
- Enter the validator-testnet directory
cd validator-testnet
- Start the composition
docker-compose up -d
- Return to the compose directory:
cd ..
- Enter the validator-testnet directory
- Enjoy your testnet:
- Faucet will be available at http://127.0.0.1:8000
- JSON-RPC will be available at http://127.0.0.1:8080
If you would like to clear the validator/blockchain data and start from scratch, either remove the docker volume aptos-shared
,
or run docker-compose run validator rm -rf '/opt/aptos/var/*'
from the validator-testnet directory.
To clear just the validator logs, run docker-compose run validator rm -rf '/opt/aptos/var/validator.log'