2014-12-29 13:39:42 +00:00
|
|
|
Test with various databases
|
|
|
|
===========================
|
|
|
|
|
|
|
|
|
|
|
|
MySQL
|
|
|
|
-----
|
|
|
|
|
|
|
|
Use the official [MySQL docker image](https://registry.hub.docker.com/_/mysql/).
|
|
|
|
|
|
|
|
Start MySQL:
|
|
|
|
|
|
|
|
docker run --name mysql -e MYSQL_DATABASE=keycloak -e MYSQL_USER=keycloak -e MYSQL_PASSWORD=keycloak -e MYSQL_ROOT_PASSWORD=keycloak -d mysql
|
|
|
|
|
|
|
|
Run tests:
|
|
|
|
|
|
|
|
mvn clean install -Dkeycloak.connectionsJpa.url=jdbc:mysql://`docker inspect --format '{{ .NetworkSettings.IPAddress }}' mysql`/keycloak -Dkeycloak.connectionsJpa.driver=com.mysql.jdbc.Driver -Dkeycloak.connectionsJpa.user=keycloak -Dkeycloak.connectionsJpa.password=keycloak
|
|
|
|
|
|
|
|
Stop MySQl:
|
|
|
|
|
|
|
|
docker rm -f mysql
|
|
|
|
|
|
|
|
|
|
|
|
PostgreSQL
|
|
|
|
----------
|
|
|
|
|
|
|
|
Use the official [PostgreSQL docker image](https://registry.hub.docker.com/_/postgres/).
|
|
|
|
|
2014-12-30 09:05:27 +00:00
|
|
|
Start PostgreSQL:
|
2014-12-29 13:39:42 +00:00
|
|
|
|
|
|
|
docker run --name postgres -e POSTGRES_DATABASE=keycloak -e POSTGRES_USER=keycloak -e POSTGRES_PASSWORD=keycloak -e POSTGRES_ROOT_PASSWORD=keycloak -d postgres
|
|
|
|
|
|
|
|
Run tests:
|
|
|
|
|
|
|
|
mvn clean install -Dkeycloak.connectionsJpa.url=jdbc:postgresql://`docker inspect --format '{{ .NetworkSettings.IPAddress }}' postgres`:5432/keycloak -Dkeycloak.connectionsJpa.driver=org.postgresql.Driver -Dkeycloak.connectionsJpa.user=keycloak -Dkeycloak.connectionsJpa.password=keycloak
|
|
|
|
|
2014-12-30 09:05:27 +00:00
|
|
|
Stop PostgreSQL:
|
2014-12-29 13:39:42 +00:00
|
|
|
|
|
|
|
docker rm -f postgres
|
|
|
|
|