Closed alrevuelta closed 1 month ago
@alrevuelta I found another way to achieve the same objective.
Once the contracts have been deployed the contract-repo-deployer
service stops running. It's possible to add a condition to the depends on
field for the nwaku service in docker compose like this:
depends_on:
contract-repo-deployer:
condition: service_completed_successfully
No other code is required.
The nwaku
services are not created until the contract-repo-deployer
service exits/stops successfully.
Do we specifically want to use the healthchecks
approach or will this method be sufficient?
@stubbsta Nice, that approach looks good. As long as we can block nwaku nodes to start before the contract has been deployed, I'm ok with any way to fix it.
This is addressed in PR https://github.com/waku-org/waku-simulator/pull/45
@stubbsta Can we split it into different PRs? healthchecks and RLNv2 are different things and RLNv2 might be blocked for a bit. So I would suggest to split it.
@alrevuelta I agree, I have reverted the docker-compose file to the default in PR https://github.com/waku-org/waku-simulator/pull/45 and I will create a separate PR for just this issue
Use docker healthchecks in RLN contract deployer container, so that
nwaku
nodes don't start until RLN contract has been deployed.Right now, we just use a
depends_on
innwaku
containers, which means that nwaku nodes start as soon ascontract-repo-deployer
starts and that wrong. We must wait untilcontract-repo-deployer
has finished.