Spring Boot Microservice with Postgres Database Running in Docker Contai...
Spring Boot Microservice with Postgres Database Running in Docker Container Tutorial for Beginners
In this video, we will run postgres database in docker container and integrate Postgres database with a Spring Boot Microservice Application and perform different CRUD operations i.e. Create, Read, Update, and Delete operations on the Customer entity.
Spring Boot is built on the top of the spring and contains all the features of spring. And is becoming a favorite of developers these days because it’s a rapid production-ready environment that enables the developers to directly focus on the logic instead of struggling with the configuration and setup. Spring Boot is a microservice-based framework and making a production-ready application in it takes very little time.
PostgreSQL or Postgres is the most commonly used open-source relational database. It offers features like robustness, reliability, cost-free, etc. PostgreSQL serves as a data warehouse for multiple applications like web apps, mobile apps, etc. It enables us to store enormous and sophisticated data securely. Memento Design pattern defines three roles for objects. PostgreSQL is a powerful, open-source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
PostgreSQL is used as the primary data store or data warehouse for many web, mobile, geospatial, and analytics applications. PostgreSQL is a traditional RDBMS (relational database management system) SQL database, like Oracle and MySQL.
** Running Postgres database in Docker Container **
Containers offer easy app usage and scalability. Docker is a tool to create, deploy, and run applications using containers easily. A container is a standard unit of software that can be used to package applications and all the dependencies to a single package. These containers can be run on any server platform regardless of the underlying configuration or hardware structure. Docker can be used to run postgres database instances.
Docker image or containerization is the first step to take your application to cloud. The purpose of containerized application is to make sure your application is up and running always. Cloud platforms like AWS, AZURE or Google Cloud etc. provides container service to run docker image (containerized application). Containerization is a mechanism to minimized downtime of application and to automatically scale up or scale down as per our traffic conditions.
Benefits of containerized application is we can scale up or scale down the number of instances (pods) in few seconds. Containerized applications run in PODs (containers) that is virtualization of operating system running on physical servers. Cloud services like AWS, Azure, GCP etc. ensure that PODs are always running and automatically recover from error. If any POD (application container) goes down then container service brings it up automatically without impacting the user traffic and performance.
** Connect Postgres Database with PGAdmin or DBeaver Database tool **
1. Open pgadmin or Dbeaver database tool.
2. In the left pane, create a connection to database by providing database url, port, database name, username, password information.
3. Click connect to connect to database.
** TIMESTAMPS **
0:00 Welcome to Spring Boot Microservice with Postgres DB in Docker Container
0:40 Briefing about Tools
1:40 Architecture diagram
3:28 Download Postgres database Image from DockerHub
5:41 Running Postgres database in Docker Container & Port Mapping
8:06 Connect Dbeaver tool to Postgres database
10:28 Create schema table and insert data in table
12:53 Spring Boot Microservice Project Setup in Intellij
13:42 Creating pom controller business repository domain classes and configuration
20:27 Compile and Build Spring Boot Microservice application
21:04 Running Spring Boot Microservice Application
21:47 Testing GET endpoint using postman api tool
23:50 Testing POST endpoint using postman api tool
25:27 Summary of Video
#microservice #postgresdatabase #dockercontainer
** CodeOneDigest GitHub Repository **
https://github.com/codeonedigest/spri...
** Tools **
Download DBeaver tool https://dbeaver.io/download/
Download Intellij https://www.jetbrains.com/idea/download/
Download Postman https://www.postman.com/downloads/
DockerHub https://hub.docker.com/login
Spring Project Initializer: https://start.spring.io/
** CHECK OUT OUR OTHER VIDEOS **
Spring boot project setup:
• Spring boot Proje...
Postgres Database Installation Setup and Configuration
• Postgres Database...
Prepare Docker file, Container and Build Image:
• Docker Tutorial f...
Deploy Docker Image AWS Elastic Container Service:
• Deploy Springboot...
** CHECK OUR PLAYLISTS **
Spring Boot Complete Tutorial
• Spring Boot Tutor...
Docker Containers Complete Tutorial
• Cloud & Container...
Comments
Post a Comment