Run your Application on Google Cloud Platform

Let’s use Cloud run to deploy your application in the cloudPhoto by eberhard grossgasteiger: https://www.pexels.com/photo/down-angle-photography-of-red-clouds-and-blue-sky-844297/This article is part of a list of articles to deploy your application fro…


This content originally appeared on Bits and Pieces - Medium and was authored by Rémy Villulles

Let’s use Cloud run to deploy your application in the cloud

Photo by eberhard grossgasteiger: https://www.pexels.com/photo/down-angle-photography-of-red-clouds-and-blue-sky-844297/

This article is part of a list of articles to deploy your application from scratch to Google Cloud Platform. Here are the links for the previous articles:

Build your application in Google Cloud Platform

In the previous article, we could see how to build our application and store the image in our artifact registry. In this article, we’ll see how to deploy it.

For the needs of this article, you’ll need to have a docker image stored in the artifact registry in GCP. If you don’t have any and don’t know how to do it, check my previous article.

Enable Cloud Run

Cloud run is the service that allows us to deploy and run a container and expose it.

First, we’ll have to enable it. In the search bar, look for Cloud run and select the first result under Marketplace .
Click on Activate and then access the service.

Create a service

Cloud run page

When arriving on Cloud run, you’ll see this page, click on CREATE SERVICE and let’s set it up.

Under deploy one revision from an existing container image Click on select.

Under ARTIFACT REGISTRY navigate to your build and select it.

Fill in the service name and region.

Under authentication, be sure to check the first option as we haven’t set up users with IAM.

Unfolder Container, variables and secrets, connections, security at the bottom of the page and change the port to 3000 as it’s on this port that our app is listening.

Click and CREATE and let your container deploy itself.

Once deployed, you’ll find the URL at the top:

Simply access it and just add /ping at the end of the URL. You should be able to see pong

Shut down the service

A Cloud Run service is not like a dedicated machine and it cannot be stopped. Only deleted. If you’d like to delete the service (and you should if you don’t want to pay if some malicious people decide to spam it) you should simply go back to the dashboard of Cloud Run.

In there, you are able to select your running service by clicking on the tickbox on the left. Then click on DELETE at the top.

After waiting for a bit, the service will be deleted!

Build composable web applications

Don’t build web monoliths. Use Bit to create and compose decoupled software components — in your favourite frameworks like React or Node. Build scalable and modular applications with a powerful and enjoyable dev experience.

Bring your team to Bit Cloud to host and collaborate on components together, and speed up, scale, and standardize development as a team. Try composable frontends with a Design System or Micro Frontends, or explore the composable backend with serverside components.

Give it a try →

Learn more


Run your Application on Google Cloud Platform was originally published in Bits and Pieces on Medium, where people are continuing the conversation by highlighting and responding to this story.


This content originally appeared on Bits and Pieces - Medium and was authored by Rémy Villulles


Print Share Comment Cite Upload Translate Updates
APA

Rémy Villulles | Sciencx (2022-04-19T11:11:59+00:00) Run your Application on Google Cloud Platform. Retrieved from https://www.scien.cx/2022/04/19/run-your-application-on-google-cloud-platform/

MLA
" » Run your Application on Google Cloud Platform." Rémy Villulles | Sciencx - Tuesday April 19, 2022, https://www.scien.cx/2022/04/19/run-your-application-on-google-cloud-platform/
HARVARD
Rémy Villulles | Sciencx Tuesday April 19, 2022 » Run your Application on Google Cloud Platform., viewed ,<https://www.scien.cx/2022/04/19/run-your-application-on-google-cloud-platform/>
VANCOUVER
Rémy Villulles | Sciencx - » Run your Application on Google Cloud Platform. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/04/19/run-your-application-on-google-cloud-platform/
CHICAGO
" » Run your Application on Google Cloud Platform." Rémy Villulles | Sciencx - Accessed . https://www.scien.cx/2022/04/19/run-your-application-on-google-cloud-platform/
IEEE
" » Run your Application on Google Cloud Platform." Rémy Villulles | Sciencx [Online]. Available: https://www.scien.cx/2022/04/19/run-your-application-on-google-cloud-platform/. [Accessed: ]
rf:citation
» Run your Application on Google Cloud Platform | Rémy Villulles | Sciencx | https://www.scien.cx/2022/04/19/run-your-application-on-google-cloud-platform/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.