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

added Dockerfile to build from source, added extra handling of variables for configs #2

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jianhonggalaxy
Copy link

@jianhonggalaxy jianhonggalaxy commented Dec 16, 2024

Change Description Reason for change File/Component
converted Dockerfile-binary to Dockerfile.source To build from source instead of relying on pre built binaries celestia-appfolder, celestia-app.yml
Separated environment, arg variables in celestia-app.yml into a .env file instead Realised theres a lot of dupulicated variables used in the arg and environment variables. Feel that its better to combine all these in a centralized place(.env) for better maintainability, flexibility and reduced risk of errors in celestia-app.yml celestia-app.yml, Dockerfile.source, .env
Added docker-entrypoint.sh to start whenever consensus is started This is a default template to be used for most tendermint projects. I've tried it to make it as generic as possible to be used across multiple projects and env are referenced in the .env file celestia-app/docker-entrypoint.sh
Added checks for data folder if it exist to determine if its a new node If its not a new node, do not attempt to re init, re download genesis, saving time and the node-id, will also remains the same. celestia-app/docker-entrypoint.sh(L9-L26)
Added custom inputs of seeds for p2p.seeds in config.toml if its indicated in .env file For most projects, customs seeds are needed as the default seeds from the github repo might not be updated. Need a way to update when news hits in discord celestia-app/docker-entrypoint.sh(L28-L50)
Added custom inputs of peers for p2p.persistent_peers in config.toml if its indicated in .env file For most projects, customs peers are needed as the default peers from the github repo or seed might not be updated or neough. Need a way to update when news hits in discord celestia-app/docker-entrypoint.sh(L52-L56)
Added modifications indexer for config.toml if its indicated in .env file This is useful to keep the disk space low, since we are running validators only, not rpc. Would want to modify this indexer="null" rather than the default "kv". In the future if we want to run rpc nodes, we can default it to KV celestia-app/docker-entrypoint.sh(L58-L61)
Optionally download snapshots, if indicated This is useful if we would want to keep our existing data. only download when needed to restore from snapshot celestia-app/docker-entrypoint.sh(L63-L67)
Added Custom app pruning to config.toml. This modifies the APP_PRUNING, APP_PRUNING_KEEP_RECENT, APP_PRUNING_INTERVAL This is useful to keep the disk space low, since we are running validators only, not rpc. We can modify it to custom prunning celestia-app/docker-entrypoint.sh(L86-L99)
Added minimum-gas-prices In most projects its needed to set minimum-gas-prices celestia-app/docker-entrypoint.sh(L101-L104)
Separated enable-bbr.sh to its own script This only seems to apply to celestia docker. so i've seprerated it and it only needs to run once enable-bbr.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant