arriven / db1000n

MIT License
1.17k stars 201 forks source link

Add http server listening port 8080 as parralel process in the App for Google Cloud Run compability #390

Closed ubexplorer closed 2 years ago

ubexplorer commented 2 years ago

I've deployed docker containers with db1000n on GCP Cloud Run, which serves ingress traffic preferably and bills ingress requests as well, therefore GCP trial account with Cloud Run consumes ~ 1USD/day per 10 containers. But to deploy container in GCP Cloud Run I had to rebuild image with db1000n adding to it nodejs with express http server in order to comply Cloud Run container contract. Containers were deployed succesfully but key -enable-self-update stopped working.

Add, please, http server listening port 8080 as parralel process in the App for Google Cloud Run compability.

arriven commented 2 years ago

You can probably already utilize --pprof flag for that unless cloud run requires some specific API to be present

sivillakonski commented 2 years ago

Hi @SerhiiZavalko, turning the -enable-self-update within the container won't work because it downloads and shuts down the current process in order to start a new process from a newer binary. The Docker sees that the process with PID 1 has finished, so it will simply restart it or even won't keep it up and running (depends on the restart policy).