tryingToBeBetter
tryingToBeBetter

Reputation: 425

Deploying docker-compose to Cloud Run OR GCP?

Is there a way to deploy docker-compose.yml (ruby app and postgresql db) onto cloud run or any other GCP services (except for compute instance)?

Upvotes: 1

Views: 1151

Answers (1)

Fariya Rahmat
Fariya Rahmat

Reputation: 3250

With Cloud Run, you can deploy only one container image. The container can contain several binaries that you can run in parallel. But keep that in mind:

  1. CPU is throttled when no requests are processed. Background process/app aren't recommended on Cloud Run, prefer Request/Response app on Cloud Run (a webserver).

  2. Only HTTP requests are supported by Cloud Run. TCP connections (such as MySQL connection) aren't supported.

  3. Cloud Run is stateless. You can't persist data in it.

  4. All the data are stored in memory (directory /tmp is writable). You can exceed the total size of the instance memory (your app footprint + your files stored in memory)

  5. Related to the previous point, when the instance is offloaded (you don't manage that, it's serverless), you lose all what you put in memory.

AS @guillaume blaquiere mentioned you can deploy docker-compose On GKE. Kompose is a tool that lets you take Docker Compose files and deploy them to Kubernetes clusters.

Refer this stackpost for more information.

Upvotes: 2

Related Questions