From 37726bd4d9d2ca7f027a88b3e3f237371bb7f037 Mon Sep 17 00:00:00 2001 From: talented Date: Wed, 17 Jul 2019 15:44:08 +0200 Subject: [PATCH] App is Dockerized --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 98e25b4..b52343f 100644 --- a/README.md +++ b/README.md @@ -24,15 +24,19 @@ git clone https://github.com/talented/Sales-Records-API.git 2. Run ```shell -docker-compose up --build +cd Sales-Records-Api + +docker-compose build + +docker-compose up ``` 3. Without stopping the running server open a new tab in your terminal and run commands below to populate the postgresql database in your running container with the data from "2000_Sales_Records.csv" under pgdata folder ```shell -docker cp init.sql apitest_db_1:/docker-entrypoint-initdb.d/init.sql +docker cp init.sql sales-records-api_db_1:/docker-entrypoint-initdb.d/init.sql -docker exec -u postgres apitest_db_1 psql postgres postgres -f docker-entrypoint-initdb.d/init.sql +docker exec -u postgres sales-records-api_db_1 psql postgres postgres -f docker-entrypoint-initdb.d/init.sql ``` 4. Check your browser that your API endpoint is ready at