Sign inSign up

wwinder/algod

By wwinder

•Updated over 3 years ago

Image
0

10K+

wwinder/algod repository overview

⁠Algod Container

General purpose algod docker container.

⁠Image Configuration

There are a number of special files and environment variables used to control how a container is started.

⁠Default Configuration

By default the following config.json overrides are applied:

SettingValue
GossipFanout1
EndpointAddress0.0.0.0:8080
IncomingConnectionsLimit0
Archivalfalse
IsIndexerActivefalse
EnavleDeveloperAPItrue

⁠Environment Variables

The following environment variables can be supplied. Except when noted, it is possible to reconfigure deployments even after the data directory has been initialized as a mounted volume.

VariableDescription
NETWORKLeave blank for a private network, otherwise specify one of mainnet, bet anet, testnet, or devnet. Only used during a data directory initialization.
FAST_CATCHUPIf set on a public network, attempt to start fast-catchup during initial config.
TELEMETRY_NAMEIf set on a public network, telemetry is reported with this name.
DEV_MODEIf set on a private network, enable dev mode. Only used during data directory initialization.
NUM_ROUNDSIf set on a private network, override default of 30000 participation keys.
TOKENIf set, overrides the REST API token.
ADMIN_TOKENIf set, overrides the REST API admin token.

⁠Special Files

Configuration can be modified by specifying certian files. These can be changed each time you start the container if the data directory is a mounted volume.

FileDescription
/etc/config.jsonOverride default configurations by providing your own file.
/etc/algod.tokenOverride default randomized REST API token.
/etc/algod.admin.tokenOverride default randomized REST API admin token.

TODO: /etc/template.json for overriding the private network topology.

⁠Example Configuration

The following command launches a container configured with one of the public networks:

docker run --rm -it \
    -p 4190:8080 \
    -e NETWORK=mainnet \
    -e FAST_CATCHUP=1 \
    -e TELEMETRY_NAME=name \
    -e TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
    -v ${PWD}/data:/algod/data/ \
    --name mainnet-container \
    algorand/algod:latest

Explanation of parts:

  • -p 4190:8080 maps the internal algod REST API to local port 4190
  • -e NETWORK= can be set to any of the supported public networks.
  • -e FAST_CATCHUP= causes fast catchup to start shortly after launching the network.
  • -e TELEMETRY_NAME= enables telemetry reporting to Algorand for network health analysis.
  • -e TOKEN= sets the REST API token to use.
  • -v ${PWD}/data:/algod/data/ mounts a local volume to the data directory, which can be used to restart and upgrad the deployment.

⁠Mounting the Data Directory

The data directory located at /algod/data. Mounting a volume at that location will allow you to shutdown and resume the node.

⁠Private Network

Private networks work a little bit differently. They are configured with, potentially, several data directories. To allow a seamless experience, the default topology supplied with this container is installed to /algod/, and a single node named data is configured. This means the private network has a data directory at /algod/data.

If persistence is required, you should mount the volume /algod/ instead of /algod/data. This will allow the network to be persisted even with other network configurations.

Note: The private network changes depend on #3911, which allows the private network root directory to exist if it is empty.

Tag summary

Content type

Image

Digest

sha256:407338c49…

Size

187.6 MB

Last updated

over 3 years ago

docker pull wwinder/algod