From 9a13d9e9b4a7da9c57790651165763e51f7198a8 Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Mon, 22 Dec 2025 02:04:28 +0400 Subject: [PATCH 01/15] Add SCM configuration --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index ae930ae5c..8ad40e100 100644 --- a/pom.xml +++ b/pom.xml @@ -39,6 +39,12 @@ https://www.apache.org/licenses/LICENSE-2.0 + + scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git + scm:git:git@github.com:anna-ishkhanyan/spring-petclinic.git + https://github.com/anna-ishkhanyan/spring-petclinic + HEAD + From 57310a61e497be0266ae18f3627c08d70697956a Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Mon, 22 Dec 2025 02:05:15 +0400 Subject: [PATCH 02/15] [maven-release-plugin] prepare release release-5.0.0 --- pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 8ad40e100..a83364526 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.samples spring-petclinic - 4.0.0-SNAPSHOT + 5.0.0 petclinic @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2024-11-28T14:37:52Z + 2025-12-21T22:05:10Z 1.1.2 @@ -43,7 +43,7 @@ scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git scm:git:git@github.com:anna-ishkhanyan/spring-petclinic.git https://github.com/anna-ishkhanyan/spring-petclinic - HEAD + release-5.0.0 @@ -376,7 +376,7 @@ - + @@ -389,7 +389,7 @@ - + @@ -402,7 +402,7 @@ - + From 4193699f7222f12987e1d42dc71976eedb15d7d5 Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Mon, 22 Dec 2025 02:07:19 +0400 Subject: [PATCH 03/15] Fix SCM to use HTTPS instead of SSH --- pom.xml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index a83364526..28ef41475 100644 --- a/pom.xml +++ b/pom.xml @@ -39,13 +39,12 @@ https://www.apache.org/licenses/LICENSE-2.0 - - scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git - scm:git:git@github.com:anna-ishkhanyan/spring-petclinic.git - https://github.com/anna-ishkhanyan/spring-petclinic - release-5.0.0 - - + + scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git + scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git + https://github.com/anna-ishkhanyan/spring-petclinic + HEAD + From 997c04c60f39aeb514c0f8ecc3239e078905be9a Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Mon, 22 Dec 2025 02:08:23 +0400 Subject: [PATCH 04/15] Fix SCM to use HTTPS instead of SSH --- pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 28ef41475..9e06f5af6 100644 --- a/pom.xml +++ b/pom.xml @@ -39,12 +39,12 @@ https://www.apache.org/licenses/LICENSE-2.0 - - scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git - scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git - https://github.com/anna-ishkhanyan/spring-petclinic - HEAD - + + scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git + scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git + https://github.com/anna-ishkhanyan/spring-petclinic + HEAD + From e5b922981ae8f2f9fc614e0611255acc3e690daf Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Mon, 22 Dec 2025 02:09:11 +0400 Subject: [PATCH 05/15] [maven-release-plugin] rollback the release of release-5.0.0 --- pom.xml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 9e06f5af6..8ad40e100 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.samples spring-petclinic - 5.0.0 + 4.0.0-SNAPSHOT petclinic @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2025-12-21T22:05:10Z + 2024-11-28T14:37:52Z 1.1.2 @@ -41,10 +41,11 @@ scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git - scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git + scm:git:git@github.com:anna-ishkhanyan/spring-petclinic.git https://github.com/anna-ishkhanyan/spring-petclinic HEAD + @@ -375,7 +376,7 @@ - + @@ -388,7 +389,7 @@ - + @@ -401,7 +402,7 @@ - + From 0201fcf9ae46db86ba1395a3595f75fa1ad5564a Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Mon, 22 Dec 2025 02:09:58 +0400 Subject: [PATCH 06/15] [maven-release-plugin] prepare release release-5.0.0 --- pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 8ad40e100..1c148346e 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.samples spring-petclinic - 4.0.0-SNAPSHOT + 5.0.0 petclinic @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2024-11-28T14:37:52Z + 2025-12-21T22:09:52Z 1.1.2 @@ -43,7 +43,7 @@ scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git scm:git:git@github.com:anna-ishkhanyan/spring-petclinic.git https://github.com/anna-ishkhanyan/spring-petclinic - HEAD + release-5.0.0 @@ -376,7 +376,7 @@ - + @@ -389,7 +389,7 @@ - + @@ -402,7 +402,7 @@ - + From eba3cd7a132513719bb81e469c72791580918213 Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Mon, 22 Dec 2025 02:10:49 +0400 Subject: [PATCH 07/15] [maven-release-plugin] rollback the release of release-5.0.0 --- pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 1c148346e..8ad40e100 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.samples spring-petclinic - 5.0.0 + 4.0.0-SNAPSHOT petclinic @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2025-12-21T22:09:52Z + 2024-11-28T14:37:52Z 1.1.2 @@ -43,7 +43,7 @@ scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git scm:git:git@github.com:anna-ishkhanyan/spring-petclinic.git https://github.com/anna-ishkhanyan/spring-petclinic - release-5.0.0 + HEAD @@ -376,7 +376,7 @@ - + @@ -389,7 +389,7 @@ - + @@ -402,7 +402,7 @@ - + From e854e6e26f2a9d4985fef7094315bd355e1a9146 Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Mon, 22 Dec 2025 02:11:05 +0400 Subject: [PATCH 08/15] [maven-release-plugin] prepare release release-5.0.0 --- pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 8ad40e100..4d5150bf5 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.samples spring-petclinic - 4.0.0-SNAPSHOT + 5.0.0 petclinic @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2024-11-28T14:37:52Z + 2025-12-21T22:11:00Z 1.1.2 @@ -43,7 +43,7 @@ scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git scm:git:git@github.com:anna-ishkhanyan/spring-petclinic.git https://github.com/anna-ishkhanyan/spring-petclinic - HEAD + release-5.0.0 @@ -376,7 +376,7 @@ - + @@ -389,7 +389,7 @@ - + @@ -402,7 +402,7 @@ - + From afeb85aaacc0c792b39e06904b0bc4fa301d7e56 Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Mon, 22 Dec 2025 02:11:08 +0400 Subject: [PATCH 09/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 4d5150bf5..5cadf6cae 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.samples spring-petclinic - 5.0.0 + 5.1.0-SNAPSHOT petclinic @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2025-12-21T22:11:00Z + 2025-12-21T22:11:08Z 1.1.2 @@ -43,7 +43,7 @@ scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git scm:git:git@github.com:anna-ishkhanyan/spring-petclinic.git https://github.com/anna-ishkhanyan/spring-petclinic - release-5.0.0 + HEAD From 67d67d0bf2c18e50abae3628cfa708cacfcd97c5 Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Mon, 22 Dec 2025 02:15:23 +0400 Subject: [PATCH 10/15] [maven-release-plugin] rollback the release of release-5.0.0 --- pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 5cadf6cae..8ad40e100 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.samples spring-petclinic - 5.1.0-SNAPSHOT + 4.0.0-SNAPSHOT petclinic @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2025-12-21T22:11:08Z + 2024-11-28T14:37:52Z 1.1.2 @@ -376,7 +376,7 @@ - + @@ -389,7 +389,7 @@ - + @@ -402,7 +402,7 @@ - + From 5281b2093b3dc6320408a995bd927d7569a5a76f Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Sat, 27 Dec 2025 22:59:15 +0400 Subject: [PATCH 11/15] Set version to 5.0.0 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8ad40e100..88d3c1c4d 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.samples spring-petclinic - 4.0.0-SNAPSHOT + 5.0.0 petclinic @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2024-11-28T14:37:52Z + 2025-12-27T18:59:06Z 1.1.2 From 6897a317fd69e9aa83221d19fdec0dfef7fb7a8d Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Sat, 27 Dec 2025 23:03:03 +0400 Subject: [PATCH 12/15] Set version to 5.0.0-SNAPSHOT --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 88d3c1c4d..b7934e243 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.samples spring-petclinic - 5.0.0 + 5.0.0-SNAPSHOT petclinic @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2025-12-27T18:59:06Z + 2025-12-27T19:02:58Z 1.1.2 From d1b67b22917753c9fa56a874f29ac1f1563baa62 Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Sat, 27 Dec 2025 23:05:30 +0400 Subject: [PATCH 13/15] [maven-release-plugin] prepare release spring-petclinic-5.0.0 --- pom.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index b7934e243..f5341b207 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.samples spring-petclinic - 5.0.0-SNAPSHOT + 5.0.0 petclinic @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2025-12-27T19:02:58Z + 2025-12-27T19:03:08Z 1.1.2 @@ -43,7 +43,7 @@ scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git scm:git:git@github.com:anna-ishkhanyan/spring-petclinic.git https://github.com/anna-ishkhanyan/spring-petclinic - HEAD + spring-petclinic-5.0.0 @@ -376,7 +376,7 @@ - + @@ -389,7 +389,7 @@ - + @@ -402,7 +402,7 @@ - + From 34571b8965c4b5c23f5f782909544d309a24b2c0 Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Sat, 27 Dec 2025 23:05:33 +0400 Subject: [PATCH 14/15] [maven-release-plugin] prepare for next development iteration --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index f5341b207..6e856f886 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.springframework.samples spring-petclinic - 5.0.0 + 5.1.0-SNAPSHOT petclinic @@ -17,7 +17,7 @@ UTF-8 UTF-8 - 2025-12-27T19:03:08Z + 2025-12-27T19:05:33Z 1.1.2 @@ -43,7 +43,7 @@ scm:git:https://github.com/anna-ishkhanyan/spring-petclinic.git scm:git:git@github.com:anna-ishkhanyan/spring-petclinic.git https://github.com/anna-ishkhanyan/spring-petclinic - spring-petclinic-5.0.0 + HEAD From fb1870c4c6d82e2af7d1773aada1b99f53686baa Mon Sep 17 00:00:00 2001 From: Anna Ishkhanyan Date: Fri, 9 Jan 2026 16:54:38 +0400 Subject: [PATCH 15/15] Add Docker Module Files --- .env.example | 6 ++++++ .gitignore | 1 + Dockerfile | 17 +++++++++++++++++ docker-compose.yml | 41 ++++++++++++++++++++++++----------------- 4 files changed, 48 insertions(+), 17 deletions(-) create mode 100644 .env.example create mode 100644 Dockerfile diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..a66fd09c5 --- /dev/null +++ b/.env.example @@ -0,0 +1,6 @@ +MYSQL_DATABASE=db_name +MYSQL_USER=db_user +MYSQL_PASSWORD=db_password +MYSQL_ROOT_PASSWORD=root_password + +SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/db_name \ No newline at end of file diff --git a/.gitignore b/.gitignore index 76cb65ff3..ea43e68f3 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ out/ _site/ *.css !petclinic.css +.env \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..25e21ee30 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# STAGE 1: Build +FROM gradle:8.14.2-jdk17 AS builder + +WORKDIR /build +COPY . . +RUN gradle clean build -x test + +RUN cp /build/target/spring-petclinic-*.jar /build/app.jar + +# STAGE 2: Runtime +FROM eclipse-temurin:17-jre-jammy + +WORKDIR /app +COPY --from=builder /build/app.jar app.jar + +EXPOSE 8080 +ENTRYPOINT ["java", "-jar", "app.jar"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index b2313a1e6..7c9cf849c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,21 +1,28 @@ services: - mysql: - image: mysql:9.5 - ports: - - "3306:3306" + db: + image: mysql:8.0 + container_name: petclinic-db environment: - - MYSQL_ROOT_PASSWORD= - - MYSQL_ALLOW_EMPTY_PASSWORD=true - - MYSQL_USER=petclinic - - MYSQL_PASSWORD=petclinic - - MYSQL_DATABASE=petclinic - volumes: - - "./conf.d:/etc/mysql/conf.d:ro" - postgres: - image: postgres:18.1 + MYSQL_DATABASE: ${MYSQL_DATABASE} + MYSQL_USER: ${MYSQL_USER} + MYSQL_PASSWORD: ${MYSQL_PASSWORD} + MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] + interval: 10s + timeout: 5s + retries: 5 + + app: + build: . + container_name: petclinic-app ports: - - "5432:5432" + - "9090:8080" environment: - - POSTGRES_PASSWORD=petclinic - - POSTGRES_USER=petclinic - - POSTGRES_DB=petclinic + SPRING_PROFILES_ACTIVE: mysql + SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL} + SPRING_DATASOURCE_USERNAME: ${MYSQL_USER} + SPRING_DATASOURCE_PASSWORD: ${MYSQL_PASSWORD} + depends_on: + db: + condition: service_healthy \ No newline at end of file