getlago / lago-api

Open Source Metering and Usage Based Billing
https://www.getlago.com/
GNU Affero General Public License v3.0
305 stars 79 forks source link

[BUG]: clock did not work with gcp cloudrun #2036

Open superpoussin22 opened 2 weeks ago

superpoussin22 commented 2 weeks ago

Describe the bug using GCP cloud run , the cloud run need an endpoitn to do a startup check to ensure the container is running but the clock container start ./scripts/start.clock.sh and didn't provide an endpoint like an open port. (ex: 3000 ) to ensure the service is up

Expected behavior have an endpoint to check the service is up and running

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Version

jdenquin commented 2 weeks ago

Hello @superpoussin22 (nice nickname!)

Clock service is not running any web server, it's a job process, we can't monitor it like a web server. Is it possible to launch it as a job or worker on GCP?

superpoussin22 commented 2 weeks ago

Hi @jdenquin , thanks. The idea was to use fully managed service ( Cloud run) what require to have something to verify that the service/container start well , this is mandatory in GCP if using serverless and can be done uisng http or tcp or grpc call .

If not doable, it will require then to create a small VM ( same issue I think for the worker part )

https://cloud.google.com/run/docs/configuring/healthchecks?hl=en

superpoussin22 commented 2 weeks ago

also creating VM will require to give access to the bucket for storage, what will expose the GCS json key what is bad in term of security