diff --git a/build.gradle b/build.gradle index 0880181..a0d1c14 100644 --- a/build.gradle +++ b/build.gradle @@ -35,14 +35,19 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa:3.2.+' implementation 'org.springframework.boot:spring-boot-starter-web:3.1.+' implementation 'org.springframework.boot:spring-boot-starter-webflux:3.1.+' + + // Spring Boot test support testImplementation 'org.springframework.boot:spring-boot-starter-test:3.1.+' - // Uncomment if you wish to use Docker Compose on local application startup - //developmentOnly 'org.springframework.boot:spring-boot-docker-compose' + // Spring Boot Docker support + developmentOnly 'org.springframework.boot:spring-boot-docker-compose' // OpenAPI Auto-Generated Documentation implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.+' + // Postgres Driver + implementation 'org.postgresql:postgresql' + // Mock DB implementation 'com.h2database:h2' diff --git a/compose.yaml b/compose.yaml index cb37dec..469c11c 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,13 +1,18 @@ +# This config is based on Spring Docker Compose support +# https://spring.io/blog/2023/06/21/docker-compose-support-in-spring-boot-3-1 version: '3.1' services: db: image: postgres restart: always + ports: + - 5432:5432 environment: + POSTGRES_DB: movieman POSTGRES_USER: movieman POSTGRES_PASSWORD: mayonnaise1 adminer: image: adminer restart: always ports: - - 8080:8080 + - 5442:8080 diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index e78cdcf..6e497dc 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -31,3 +31,11 @@ spring: tmdb: base-url: http://localhost:9080 + +--- +spring: + config: + activate: + on-profile: local + jpa: + database: POSTGRESQL