From 447580f4ae69e875fa1de9201fbc288b97dab8ae Mon Sep 17 00:00:00 2001 From: Antoine Rey Date: Mon, 17 Oct 2016 08:13:11 +0200 Subject: [PATCH] Adding docker command line for starting a Postgres database --- readme.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 8066a12e5..bf652204d 100644 --- a/readme.md +++ b/readme.md @@ -41,10 +41,10 @@ Before do this, would be good to check properties defined in MySQL profile insid ``` -You may start a MySql database with docker: +You may also start a MySql database with docker: ``` -docker run -e MYSQL_ROOT_PASSWORD=petclinic -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8 +docker run --name mysql-petclinic -e MYSQL_ROOT_PASSWORD=petclinic -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8 ``` For PostgreSQL database, it is needed to run with 'PostgreSQL' profile defined in main pom.xml file. @@ -58,14 +58,17 @@ Before do this, would be good to check properties defined in PostgreSQL profile ``` POSTGRESQL - org.hibernate.dialect.PostgreSQLDialect org.postgresql.Driver jdbc:postgresql://localhost:5432/petclinic postgres petclinic -``` +``` +You may also start a Postgres database with docker: +``` +docker run --name postgres-petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 -d postgres:9.6.0 +``` ## Working with Petclinic in Eclipse/STS