Spring boot Microservice in Docker Container with Postgres Database in D...
Spring boot Microservice in Docker Container with Postgres Database in Docker Container Explained
In this video, we will run springboot microservice and postgres database both in separate docker containers 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. Microservice application container will connect to database container using docker bridge network.
Spring Boot is built on the top of the spring framework 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 Microservice and Postgres database in Docker Containers **
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 springboot microservice application and postgres database instance.
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 goes down then container service brings it up automatically without impacting the user traffic and performance.
** TIMESTAMPS **
0:00 Welcome to Spring Boot Microservice with Postgres DB in Docker Containers
1:21 Understand architecture diagram
3:56 Prerequisites to Spring Boot Microservice with Postgres DB in Docker
4:42 Download Postgres Image from DockerHub repository
6:55 Run Postgres Image in Docker Container
9:21 Connect Dbeaver database tool to postgres database
11:42 Create schema, table and insert data in table
14:07 Create Springboot Microservice project in Intellij
20:13 Understand application properties file with database configuration
22:15 Understand docker file for springboot microservice application
25:37 Build docker image of springboot microservice application
27:41 Find IP address of database docker container
30:03 Run springboot microservice application image in docker container
32:14 Test GET and POST endpoints of springboot microservice application
34:16 Cleanup activity and stopping docker containers
35:33 Summary of springboot microservice project in docker with postgres db in docker
#springbootmicroservice #postgres #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
** CHECK OUR PLAYLISTS **
Spring Boot Complete Tutorial
• Spring Boot Tutor...
Docker Containers Complete Tutorial
• Cloud & Container...
Database Installation, Setup and Configuration
• Database Installa...
** OUR WEBSITE **
https://codeonedigest.wordpress.com/
** GET IN TOUCH **
Email us on codeonedigest@gmail.com
Comments
Post a Comment