Add a docker-compose file
This commit is contained in:
parent
4bd09d352d
commit
6a0978e490
17
README.md
17
README.md
@ -1,5 +1,16 @@
|
|||||||
# Run tests
|
## Setup the dev env
|
||||||
|
|
||||||
Use lastest postgres docker from https://hub.docker.com/r/library/postgres/ and run:
|
Just run the docker-compose file to create the database.
|
||||||
|
|
||||||
env POSTGRES_DSN="postgres://test:test@192.168.99.100:32771/test?sslmode=disable" go test -v -p=1 ./...
|
|
||||||
|
```
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Run the tests
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
POSTGRES_DSN="postgres://test:test@127.0.0.1:5432/test?sslmode=disable" go test -v -p=1 ./...
|
||||||
|
```
|
||||||
|
9
docker-compose.yml
Normal file
9
docker-compose.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
postgresql:
|
||||||
|
image: postgres:9.5
|
||||||
|
container_name: canape_postgresql_dev
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- POSTGRES_PASSWORD=test
|
||||||
|
- POSTGRES_USER=test
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:5432:5432
|
Loading…
x
Reference in New Issue
Block a user