smartcontractkit / chainlink

node of the decentralized oracle network, bridging on and off-chain computation
https://chain.link
Other
7.02k stars 1.71k forks source link

[FEAT] Introduce wait loop for PGSQL #4115

Open yorickdowne opened 3 years ago

yorickdowne commented 3 years ago

Description On startup of chainlink node, have a wait loop for configured PGSQL URL instead of exiting.

Motivation This is a QoL feature, it makes for easier deployment in docker-compose dev environments. This can be solved currently with a custom image that adds dockerize.

PatrickAlphaC commented 3 years ago

How long do you think it should wait for? Should it loop for a certain period of time?

yorickdowne commented 3 years ago

60s would be sufficient to allow PostgreSQL to start up if it's in the same k8s/docker-compose "stack"

pinebit commented 2 years ago

Isn't it sufficient to just use https://github.com/peter-evans/docker-compose-healthcheck or https://github.com/vishnubob/wait-for-it and then make PG a dependency for the CL service?