Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Is it possible to control canton's gRPC health endpoint programmatically?Forum ↗

Is it possible to control canton's gRPC health endpoint programmatically?

App Development3 posts152 views2 likesLast activity Mar 2024
LU
LucianoOP
Mar 2024

When starting up PQS in a containerized environment, we need to wait for the upload of specific dars with our application code to the canton participant, before starting the PQS container. Otherwise the schema (tables) will be missing for that particular dar.

For this purpose, I’m wondering if it’s possible to control the gRPC health endpoint of a participant from a bootstrap script? The idea would be to only make it healthy once the dar has been uploaded from the script - this would stall the startup of the PQS container.

Is it possible to control the health endpoints programmatically / from the canton console?

MG
mgodf89
Mar 2024

Hi Luciano,

Have you considered using an init container to do the dar upload in docker compose and have your PQS service depend on it with the service_completed_successfully condition?

eg. Does docker-compose support init container? - Stack Overflow

LU
Luciano
Mar 2024

Thanks Michael for your suggestion. Yes, we also thought of this; discussion here (internal repo). Somebody else also suggested this, so it seems a true and tried solution.
Waiting to see if someone form the canton team has any ideas about overriding the health end-point though.

← Back to Discussions