Skip to content

Commit d10f500

Browse files
committed
docker: fix application.yml files and docker files to handle correct mvn test lifecycle
1 parent 51274e3 commit d10f500

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM maven:3.9.6-eclipse-temurin-17 AS builder
22
WORKDIR /app
33
COPY . /app/
4-
RUN mvn clean package -DskipTests
4+
RUN mvn clean package -Dspring.profiles.active=test
55

66
FROM eclipse-temurin:17-jre-alpine
77
WORKDIR /app

docker-compose.example.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ services:
1111
- "5433:5432"
1212
healthcheck:
1313
test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME}" ]
14-
interval: 5s
14+
interval: 10s
1515
timeout: 5s
16-
retries: 10
16+
retries: 20
1717

1818
subscription-service:
1919
image: subscription-service:0.0.1

src/main/resources/application.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ spring:
1010
show-sql: true
1111
properties:
1212
hibernate:
13+
dialect: org.hibernate.dialect.PostgreSQLDialect
1314
format_sql: true
1415
hibernate:
1516
ddl-auto: none

src/test/resources/application-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ spring:
55
datasource:
66
url: jdbc:${DB_BASE:postgresql}://${DB_SERVER:localhost}:${DB_PORT:5433}/${DB_NAME:subscription_service_app}
77
username: ${DB_USERNAME:postgres}
8-
password: ${DB_PASSWORD:root}
8+
password: ${DB_PASSWORD:root}
9+
liquibase:
10+
enabled: false

0 commit comments

Comments
 (0)