Skip to content

Commit 40e8be1

Browse files
committed
docs(README) Refer to postgres setup in Makefile
Also check that Docker is installed before executing `make postgres`
1 parent 796668a commit 40e8be1

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ commit-hook:
4242
full-clean: check-docker
4343
docker images -q $(IMAGE_PREFIX)$(COMPONENT) | xargs docker rmi -f
4444

45-
postgres:
45+
postgres: check-docker
4646
docker start postgres || docker run --restart="always" -d -p 5432:5432 --name postgres postgres:9.3
4747
docker exec postgres createdb -U postgres deis 2>/dev/null || true
4848
@echo "To use postgres for local development:"

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,11 @@ helmc install workflow-dev
5050

5151
### Postgresql
5252

53-
Postgresql can be installed via `homebrew`:
54-
55-
```
56-
brew install postgresql
57-
```
58-
59-
Or via your package manager. For example, on Debian Jessie:
60-
53+
The application and tests use PostgreSQL. To start a local instance via Docker, run `make postgres` and set the following in your shell:
6154
```
62-
apt-get install postgresql libpq-dev
55+
export PGHOST=`docker-machine ip $(docker-machine active) 2>/dev/null || echo 127.0.0.1`
56+
export PGPORT=5432
57+
export PGUSER=postgres
6358
```
6459

6560
### Python

0 commit comments

Comments
 (0)