This is a fork
of CosmosSDK's Cosmovisor of this commit
on branch main
. It basically adds some flags to override the default folder structure, similar to #16550
with the aim to run Cosmovisor inside a docker container; see Omni's halovisor
for more details.
It adds the following flags:
COSMOVISOR_CUSTOM_ROOT
: Allows overriding the default root folderDEAMON_HOME/cosmovisor
containing all cosmovisor data.COSMOVISOR_CUSTOM_CURRENT_LINK
: Allows overriding the default current linkDEAMON_HOME/cosmovisor/current
.
Problems it solves:
- The default cosmovisor folder structure makes it hard to run cosmovisor inside a docker container.
- The current link should be mountable, so that it is retained between container restarts.
- A single external mount with all external data simplifies the setup.
- Since root is hard coded to
DEAMON_HOME/cosmovisor
, it clashes with the defaultDEAMON_HOME/config
andDEAMON_HOME/data
folders. - The current link is hard coded to
DEAMON_HOME/cosmovisor/current
, which is not mountable.
mkdir temp-cosmos-sdk
cd temp-cosmos-sdk/
git init
git remote add -f upstream [email protected]:cosmos/cosmos-sdk.git
git config core.sparseCheckout true
echo "tools/cosmovisor/" >> .git/info/sparse-checkout
git pull upstream main
cd tools/cosmovisor/
git init
git remote add origin [email protected]:omni-network/cosmovisor.git
git add .
git commit -am "fork from upstream"
git push -u origin main -f
# Modify the code
git commit -am "Add custom flags"
git push