This folder contains docker specific files organized by build-target. They are used in build processes in local development as well as in deployment builds.
The folder has following build-targets:
binary-builder - The cudos-node daemon used by full-node, root-node, seed-node, sentry-node and standalone-node.
config - Contains genesises, peers and seeds for local dev, public and private testnets.
debug-node - Cudos node that uses local source files resulting in easy debug capabilities
ethereum - Ethereum light or full node.
faucet - Faucet used by local dev, public and private testnets.
full-node - Cudos full node that connects to local chain, private or public testnets. It can be promoted to a validator.
gravity-bridge-ui - Gravity Bridge UI used to transfer funds between the Cosmos <-> Ethereum chains.
cudos-nft-minting-ui - Cudos NFT Minting UI is used as GUI of the NFT features of the CUDOS network/
gravity-contract-deployer - Standalone build-target that has a sole purpose of deployment a new Gravity contract.
orchestartor - Orchestrator binary that must run along with the validator
root-node - Cudos root node that initializes a chain. It contains the root validator.
seed-node - Cudos seed node that connects to local chain, private or public testnets.
sentry-node - Cudos sentry node that connects to local chain, private or public testnets.
standalone-node - Standalone cudos daemon containing a single root-validator node. It can be used for test purposes.
monitoring - Monitoring containing prometheus, grafana and exporter. It can be used for moniting nodes of the network.
config folder contains configuration files as described above. All other folders have idencical structure. The structure consists of one or more sets of the following files:
.yml - Docker compose file.
.arg - Docker compose build parameters. Usually a single .yml file could have several .args files. Each of them is used in a specific build-variant. For example: init-full-node.yml has full-node.client.local01.arg, full-node.client.testnet.private01.arg and few more.
.env - Env variables of the running container. An .arg file could have a corresponding .env file. For example full-node.client.local01.arg has full-node.client.local01.env.
Each set (.yml, .arg, .env) corresponds to a build-variant.
The .env file for each build-variant is not part of the repository, because it contains either private data or it is local configuration. In order to create corresponding .env file, you have to copy the .env.example and rename in accordance to .arg file that matches the build-variant that you need. You can refer to ENV files fields section for more information how to fill an .env file.
Build process of each of the variants above starts with an .yml file that uses parameters defined in .arg file. The .arg file contains parameters for the docker-compose file as well as for the dockerfile itself. Even some of these arguments are passed as environmental variable to the container. .env file contains the environment variable of the container that are not used neither in docker-compose file nor in dockerfile.
In most docker instances in this project host file system is mounted inside the docker. This could cauce a permission errors unless it is correctly handled. That's why there are configuration files where you MUST specify your host account details in order linux user that is created inside docker container to match the host one. Some of the build-targers have users-*.override.yml. This file is used along with main .yml file of each build-variant in order to specify the linux user and group that each container should use.
In order to configure the users, make a duplicate of users-*.override.yml.example and rename it to users-*.override.yml.example. By default the user and group ids are set to 0 and corresponding names are set to root. Please fill your host's user and group details.
There are a lot of build-variants. In order to make the dev process easier and more efficient there is a set of predefined build-variants that are defined in .vscode folder (described below). This folder is suitable only for VSCode. If you are using different editor, you can open the tasks.json file in .vscode folder and see the corresponsing set of files (.yml, .arg, .env, .override.yml) that are used by the predefined build-variants. More information about the purposed of each build target will follow in local dev procedure below.
Some of these build-variats are used by npm commands described in setup tools section.