diff --git a/README.md b/README.md index c865c3b5148..aa8a6ed69ad 100644 --- a/README.md +++ b/README.md @@ -54,13 +54,13 @@ A similar setup is provided for MySQL and PostgreSQL if a persistent database co You can start MySQL or PostgreSQL locally with whatever installer works for your OS or use docker: ```bash -docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:9.1 +docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:8.4 ``` or ```bash -docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:17.0 +docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:16.1 ``` Further documentation is provided for [MySQL](https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt) @@ -158,7 +158,7 @@ Here is a list of them: The [issue tracker](https://github.com/spring-projects/spring-petclinic/issues) is the preferred channel for bug reports, feature requests and submitting pull requests. For pull requests, editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at . All commits must include a __Signed-off-by__ trailer at the end of each commit message to indicate that the contributor agrees to the Developer Certificate of Origin. -For additional details, please refer to the blog post [Hello DCO, Goodbye CLA: Simplifying Contributions to Spring](https://spring.io/blog/2025/01/06/hello-dco-goodbye-cla-simplifying-contributions-to-spring). +For additional details, please refer to the blog post [Hello DCO, Goodbye CLA: Simplifying Contributions to Spring](https://spring.io/blog/2023/01/06/hello-dco-goodbye-cla-simplifying-contributions-to-spring). ## License diff --git a/docker-compose.yml b/docker-compose.yml index 47579bbaf59..011df7254f5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: mysql: - image: mysql:9.1 + image: mysql:8.4 ports: - "3306:3306" environment: @@ -12,7 +12,7 @@ services: volumes: - "./conf.d:/etc/mysql/conf.d:ro" postgres: - image: postgres:17.0 + image: postgres:16.1 ports: - "5432:5432" environment: diff --git a/k8s/db.yml b/k8s/db.yml index c230ddba2b1..f4bde4969b3 100644 --- a/k8s/db.yml +++ b/k8s/db.yml @@ -41,7 +41,7 @@ spec: app: demo-db spec: containers: - - image: postgres:17 + - image: postgres:16.1 name: postgresql env: - name: POSTGRES_USER diff --git a/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt b/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt index 8b39c07a40a..3b5a602f540 100644 --- a/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt +++ b/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt @@ -8,12 +8,12 @@ -------------------------------------------------------------------------------- -1) Download and install the MySQL database (e.g., MySQL Community Server 5.1.x), +1) Download and install the MySQL database (e.g., MySQL Community Server 8.x), which can be found here: https://dev.mysql.com/downloads/. Or run the "docker-compose.yml" from the root of the project (if you have docker installed locally): - $ docker-compose up + $ docker compose up ... mysql_1_eedb4818d817 | MySQL init process done. Ready for start up. ... @@ -21,12 +21,12 @@ 2) (Once only) create the PetClinic database and user by executing the "db/mysql/user.sql" scripts. You can connect to the database running in the docker container using `mysql -u root -h localhost --protocol tcp`, but you don't need to run the script there - because the petclinic user is already set up if you use the provided `docker-compose.yml`. + because the petclinic user is already set up if you use the provided Docker Compose configuration. 3) Run the app with `spring.profiles.active=mysql` (e.g. as a System property via the command line, but any way that sets that property in a Spring Boot app should work). For example use - - mvn spring-boot:run -Dspring-boot.run.profiles=mysql + + ./mvnw spring-boot:run -Dspring-boot.run.profiles=mysql To activate the profile on the command line. diff --git a/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt b/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt index a998749f0cc..08ca7506434 100644 --- a/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt +++ b/src/main/resources/db/postgres/petclinic_db_setup_postgres.txt @@ -4,9 +4,9 @@ -------------------------------------------------------------------------------- -1) Run the "docker-compose.yml" from the root of the project: +1) Run the Docker Compose configuration from the root of the project: - $ docker-compose up + $ docker compose up ... spring-petclinic-postgres-1 | The files belonging to this database system will be owned by user "postgres". ... @@ -14,6 +14,6 @@ 2) Run the app with `spring.profiles.active=postgres` (e.g. as a System property via the command line, but any way that sets that property in a Spring Boot app should work). For example use - mvn spring-boot:run -Dspring-boot.run.profiles=postgres + ./mvnw spring-boot:run -Dspring-boot.run.profiles=postgres To activate the profile on the command line.