Open devrajsinghrawat opened 3 years ago
I would like to add here that this only occuers when I start the container directly using docker-compose file .. But when these containers are started using PreTest that time it picks the env variables correctly.
i.e. if I run
npm run test:only @sidetree/element
then it ll internally call pretest "pretest": "docker-compose up -d mongo ganache ipfs",
and picks up correct mnemonics.
hmm, seems like we probably need to separate the docker compose files so that running a local node is easier.
I ll let it open so that you can close it, when it done in future releases
I think I've seen this when starting up a server. Want to see if it's happening, and why it's happening, because the seed should be defined in the configuration file.
Taking some notes, it looks like this error can be reproduced by running the test for the cas-ipfs
module.
> @sidetree/cas-ipfs@0.3.1-unstable.25 pretest ~/Github/sidetree.js/packages/cas-ipfs
> docker-compose up -d ipfs mongo
WARNING: The MNEMONIC variable is not set. Defaulting to a blank string.
sidetreejs_ipfs_1 is up-to-date
sidetreejs_mongo_1 is up-to-date
> @sidetree/cas-ipfs@0.3.1-unstable.25 test ~/Github/sidetree.js/packages/cas-ipfs
> tsdx test --passWithNoTests
So we need to track down where that warning is coming from, and if it's needed or not.
This should be defaulted to an example.
When I am starting the docker-compose then the mnemonic does not picked from .env file as mentioned in comment in docker compose file.
and due to that every time, when the container is being restarted a new set of keys are being assigned.
I am starting the container, just by right click on the docker-compose in vscode by selecting "Compose up" option.