Reputation: 425
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
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:
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).
Only HTTP requests are supported by Cloud Run. TCP connections (such as MySQL connection) aren't supported.
Cloud Run is stateless. You can't persist data in it.
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)
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