Deploy your React App to Google Cloud Run using Gitlab CI/CD

Let’s start a React project

  • Install dependencies
  • Test the application
  • Deploy to GCP
Initial pipeline configuration

1st step: Creating a Cloud Run service

Example page provided by Google

2nd step: Creating a service account

  • Cloud Build Service Agent: So the account can be used to build the container using the cloud build service.
  • Storage Object Creator: So the account can be used to store the containers in a bucket.
  • Storage Object Viewer: So the account can be used to view the containers in a bucket. (Optional)
Service accounts list actions

3rd step: Enabling Cloud Run Admin

Project deployment

  • GCP_PROJECT_ID: Your GCP project id
  • GCP_SERVICE_KEY: The content of the JSON key we downloaded previously
  • GCP_SERVICE_NAME: The name of your Cloud Run service

References

--

--

--

I'm just a software developer that wants to contribute to the community by teaching. I don't have much experience but I work hard to grow my knowledge.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Stream live data from on-prem SQL Server to Google Cloud SQL for SQL Server using transactional…

The non-increasing array in Swift

Dispelling Common Misconceptions about Cloud Hosting

Best Version Control Systems For Devops

Protect Yourself Against Commits Forged In Your Name Using GitHub’s New Vigilant Mode

HTML File Structure: A Learning Journey to Web Development

Kubernetes on AWS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Miguel A. Cádiz

Miguel A. Cádiz

I'm just a software developer that wants to contribute to the community by teaching. I don't have much experience but I work hard to grow my knowledge.

More from Medium

A way to setup a GCP driven application with App Engine, Cloud Firestore and React/GraphQL

Using Stripe with custom validation

Validating, scaling and evolving an API-backed dashboard application

From Auth to API — How We Rethought Our Approach