Skip to content

Commit

Permalink
improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
octonato committed Mar 19, 2019
1 parent c175ba2 commit 05b84f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ The inventory service consumes a stream of events published to Kafka by the shop

## Setup

We provide a `docker-compose` file that you use to create a Postgres database already configured for this application. The docker container will be exposed on port 5432.
To run this application locally you will need access to a Postgres database. We suggest you run it on a docker container but a local or remote native instance will also work.

We provide a `docker-compose.yml` file that you can use to run a Postgres database already configured for this application. The docker container will be exposed on port 5432.

To create the image and start the container, run the command bellow at the root of this project.

```bash
docker-compose up -d
```

If you prefer to run Postgres on your own machine, you need to create the database, the user and password yourself. The application expects it to be running on localhost on the default port (5432), and it expects there to be a database called `shopping_cart`, with a user called `shopping_cart` with password `shopping_cart` that has full access to it. This can be created using the following SQL:
If you prefer to run Postgres on natively your machine, you need to create the database, the user and password yourself. The application expects it to be running on localhost on the default port (5432), and it expects there to be a database called `shopping_cart`, with a user called `shopping_cart` with password `shopping_cart` that has full access to it. This can be created using the following SQL:

```sql
CREATE DATABASE shopping_cart;
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
postgres:
image: postgres:latest
container_name: shopping_cart
container_name: shopping_cart_postgres
environment:
- "TZ=Europe/Amsterdam"
- "POSTGRES_USER=shopping_cart"
Expand Down

0 comments on commit 05b84f2

Please sign in to comment.