How to set up MongoDB Atlas with Spring Boot, Docker, and Google Cloud Run

Start your journey to Google Cloud deployment now

Yanneck Reiß
Published in
6 min readMar 6, 2021

--

Getting into the world of cloud development can sometimes be a little bit overwhelming. In a recent article, I already showed you how you can set up a simple Pub-Sub implementation that is often used to communicate between services.

With this tutorial, I want to bring some light onto the required steps to bring your Spring Boot application with connection to a MongoDB Atlas instance into the cloud with the help of Google Cloud or to be more specific Google Cloud Run.

To follow this article in a practical manner there are some premises for your project.

I am assuming that:

  • You have a working Spring Boot Application
  • You have a local MongoDB instance and want to deploy it to the cloud (or rather MongoDB Atlas)
  • You have registered and created a project on Google Cloud

Creating a MongoDB Atlas Cluster

MongoDB Atlas offers a free plan to test out their awesome service. Just go to their website and sign up.

--

--

Follow me on my journey as a professional mobile and fullstack developer