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
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
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.
Learn more
- How We Build Micro Frontends
- How we Build a Component Design System
- The Composable Enterprise: A Guide
- How to build a composable blog
- Extendable UI Components
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
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/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.