feat(docker): add data persistence to docker-compose #834
+356
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description and Notes
fixed #795
depends on #639
this PR addresses the lack of data persistence and network flexibility in the current
docker-compose.ymlsetup.currently, users running
docker compose upexperience:Changes
Data Persistence:
FLORESTA_DATAenvironment variable to reuse existing local blockchain data (useful for sharing data between native and Docker installations)Network Configuration:
NETWORKenvironment variable to easily switch between Bitcoin networks (bitcoin,signet,testnet,testnet4,regtest)--rpc-addressand--electrum-addressflags, avoiding port conflicts when changing networksGrafana Provisioning Fixes:
uid: prometheusto datasource provisioning config__inputs,__elements, and__requiresexport artifacts from dashboard JSON (these break provisioning and are only used for manual UI imports)${DS_PROMETHEUS}placeholders with the actual datasource uidDocumentation:
doc/docker.mdwith examples for running different networks and using local data directoriesHow to verify the changes you have done?
docker compose up -dorNETWORK=signet FLORESTA_DATA=$HOME/.floresta docker compose upcurl -s http://localhost:3333/metrics | headContributor Checklist
just pcc(recommended but slower)just lint-features '-- -D warnings' && cargo test --releaseFinally, you are encouraged to sign all your commits (it proves authorship and guards against tampering—see How (and why) to sign Git commits and GitHub's guide to signing commits).