From c9311116df71e776647127f848d000978e619855 Mon Sep 17 00:00:00 2001 From: Esko Luontola Date: Mon, 13 Aug 2018 15:48:31 +0300 Subject: [PATCH] Developing the front using a Docker backend --- README.md | 7 ++++++- docker-compose.yml | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e1a4611..21bf3a8 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Start the database docker-compose up -d db -Start the API backend (without an IDE) +Start the API backend (if not using an IDE) mvn spring-boot:run @@ -91,6 +91,11 @@ Start the web frontend (with live reloading) The application will run at http://localhost:8080/ +You may also start just the frontend or backend using Docker if you're developing only one layer of the application. + + docker-compose up -d api + docker-compose up -d web + ## More Resources diff --git a/docker-compose.yml b/docker-compose.yml index 0858a0a..08588ab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,8 @@ services: DB_USERNAME: cqrshotel DB_PASSWORD: cqrshotel DB_URL: jdbc:postgresql://db:5432/cqrshotel + ports: + - "8081:8080" db: image: postgres:9.6.1