File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,11 @@ services:
20
20
#
21
21
# As well as changing the image, the destination port will need to be changed
22
22
# from 9292 below, and in the nginx.conf proxy_pass section
23
- image : pactfoundation/pact-broker
23
+ image : pactfoundation/pact-broker:latest-multi
24
24
ports :
25
25
- " 80:9292"
26
+ depends_on :
27
+ - postgres
26
28
links :
27
29
- postgres
28
30
environment :
@@ -32,6 +34,7 @@ services:
32
34
PACT_BROKER_DATABASE_NAME : postgres
33
35
PACT_BROKER_BASIC_AUTH_USERNAME : pactbroker
34
36
PACT_BROKER_BASIC_AUTH_PASSWORD : pactbroker
37
+ PACT_BROKER_DATABASE_CONNECT_MAX_RETRIES : " 5"
35
38
# The Pact Broker provides a healthcheck endpoint which we will use to wait
36
39
# for it to become available before starting up
37
40
healthcheck :
@@ -55,3 +58,4 @@ services:
55
58
depends_on :
56
59
broker_app :
57
60
condition : service_healthy
61
+
Original file line number Diff line number Diff line change
1
+ import platform
1
2
import pathlib
2
3
3
4
import docker
@@ -65,14 +66,19 @@ def publish_existing_pact(broker):
65
66
"PACT_BROKER_PASSWORD" : "pactbroker" ,
66
67
}
67
68
69
+ target_platform = platform .platform ().lower ()
70
+
71
+ if 'macos' in target_platform or 'windows' in target_platform :
72
+ envs ["PACT_BROKER_BASE_URL" ] = "http://host.docker.internal:80"
73
+
68
74
client = docker .from_env ()
69
75
70
76
print ("Publishing existing Pact" )
71
77
client .containers .run (
72
78
remove = True ,
73
79
network = "broker_default" ,
74
80
volumes = pacts ,
75
- image = "pactfoundation/pact-cli:latest" ,
81
+ image = "pactfoundation/pact-cli:latest-multi " ,
76
82
environment = envs ,
77
83
command = "publish /pacts --consumer-app-version 1" ,
78
84
)
You can’t perform that action at this time.
0 commit comments