forked from pact-foundation/pact-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
42 lines (39 loc) · 1.15 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
version: "3"
services:
httpbin:
image: kennethreitz/httpbin
ports:
- "8000:80"
postgres:
image: postgres
healthcheck:
test: psql postgres --command "select 1" -U postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
broker_app:
image: pactfoundation/pact-broker:latest-multi
links:
- postgres
ports:
- 80:9292
environment:
PACT_BROKER_BASIC_AUTH_USERNAME: pact_workshop
PACT_BROKER_BASIC_AUTH_PASSWORD: pact_workshop
PACT_BROKER_DATABASE_USERNAME: postgres
PACT_BROKER_DATABASE_PASSWORD: password
PACT_BROKER_DATABASE_HOST: postgres
PACT_BROKER_DATABASE_NAME: postgres
# The Pact Broker provides a healthcheck endpoint which we will use to wait
# for it to become available before starting up
healthcheck:
test: [ "CMD", "wget", "-q", "--tries=1", "--spider", "http://pact_workshop:pact_workshop@localhost:9292/diagnostic/status/heartbeat" ]
interval: 1s
timeout: 2s
retries: 5
depends_on:
postgres:
condition: service_healthy