Upgraded databases

Signed-off-by: Patrick Baumgartner <contact@patbaumgartner.com>
This commit is contained in:
Patrick Baumgartner 2025-06-04 21:47:34 +02:00 committed by Dave Syer
parent 9264c4813f
commit 4a021e4ccf
5 changed files with 7 additions and 7 deletions

View file

@ -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: You can start MySQL or PostgreSQL locally with whatever installer works for your OS or use docker:
```bash ```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:9.3
``` ```
or or
```bash ```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:17.5
``` ```
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) 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)

View file

@ -1,6 +1,6 @@
services: services:
mysql: mysql:
image: mysql:9.1 image: mysql:9.3
ports: ports:
- "3306:3306" - "3306:3306"
environment: environment:
@ -12,7 +12,7 @@ services:
volumes: volumes:
- "./conf.d:/etc/mysql/conf.d:ro" - "./conf.d:/etc/mysql/conf.d:ro"
postgres: postgres:
image: postgres:17.0 image: postgres:17.5
ports: ports:
- "5432:5432" - "5432:5432"
environment: environment:

View file

@ -41,7 +41,7 @@ spec:
app: demo-db app: demo-db
spec: spec:
containers: containers:
- image: postgres:17 - image: postgres:17.5
name: postgresql name: postgresql
env: env:
- name: POSTGRES_USER - name: POSTGRES_USER

View file

@ -46,7 +46,7 @@ class MySqlIntegrationTests {
@ServiceConnection @ServiceConnection
@Container @Container
static MySQLContainer<?> container = new MySQLContainer<>("mysql:9.1"); static MySQLContainer<?> container = new MySQLContainer<>("mysql:9.3");
@LocalServerPort @LocalServerPort
int port; int port;

View file

@ -36,7 +36,7 @@ public class MysqlTestApplication {
@Profile("mysql") @Profile("mysql")
@Bean @Bean
static MySQLContainer<?> container() { static MySQLContainer<?> container() {
return new MySQLContainer<>("mysql:9.1"); return new MySQLContainer<>("mysql:9.3");
} }
public static void main(String[] args) { public static void main(String[] args) {