Spring Boot Dockerized (w/compose) | Java Spring Boot Dockerized 02

preview_player
Показать описание
Link to Repository:

Timestamps:
00:00 Welcome and short Overview over the Video
01:25 Add Dependencies to pom for data-jpa, postgres, lombok, h2
04:35 Create basic UserController, User Model, UserService and UserRepository (and add functions for getAll() and add()
22:27 Set application properties with environment variables
26:25 run docker-compose build
27:50 Fix test error (missing Import)
29:10 Fix test error (database connection in test should be with h2 and in "prod" should be with postgres), add properties to connect to h2 for running tests
32:00 run docker-compose build again
33:40 run docker-compose up and test endpoints with postman and browser
36:08 Connect to pgAdmin and connect to database
38:10 Little drawing for ports mapping in docker
Рекомендации по теме
Комментарии
Автор

Great video! One question though. Is it possible we could do a docker push into docker hub of this multi-container application as a single image? Thanks!

tariqahsan
Автор

Hi, the first time I followed everything you did and it worked. However after I tried to run it again using docker-compose up, it gives error FATAL: database "user" does not exist". Do you may be have an idea what the reason is?

JoySaha_music_maania
Автор

please imake it as hot reload like nestjs dockerized sir!

TheThornTech
Автор

The Compose file '.\docker-compose.yml' is invalid because:
services.api.entrypoint contains an invalid type, it should be a string, or an array

Why are you sharing code that does not work?

maksymmatlo
join shbcf.ru