File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,11 @@ services:
2020 #
2121 # As well as changing the image, the destination port will need to be changed
2222 # from 9292 below, and in the nginx.conf proxy_pass section
23- image : pactfoundation/pact-broker
23+ image : pactfoundation/pact-broker:latest-multi
2424 ports :
2525 - " 80:9292"
26+ depends_on :
27+ - postgres
2628 links :
2729 - postgres
2830 environment :
@@ -32,6 +34,7 @@ services:
3234 PACT_BROKER_DATABASE_NAME : postgres
3335 PACT_BROKER_BASIC_AUTH_USERNAME : pactbroker
3436 PACT_BROKER_BASIC_AUTH_PASSWORD : pactbroker
37+ PACT_BROKER_DATABASE_CONNECT_MAX_RETRIES : " 5"
3538 # The Pact Broker provides a healthcheck endpoint which we will use to wait
3639 # for it to become available before starting up
3740 healthcheck :
@@ -55,3 +58,4 @@ services:
5558 depends_on :
5659 broker_app :
5760 condition : service_healthy
61+
Original file line number Diff line number Diff line change 1+ import platform
12import pathlib
23
34import docker
@@ -65,14 +66,19 @@ def publish_existing_pact(broker):
6566 "PACT_BROKER_PASSWORD" : "pactbroker" ,
6667 }
6768
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+
6874 client = docker .from_env ()
6975
7076 print ("Publishing existing Pact" )
7177 client .containers .run (
7278 remove = True ,
7379 network = "broker_default" ,
7480 volumes = pacts ,
75- image = "pactfoundation/pact-cli:latest" ,
81+ image = "pactfoundation/pact-cli:latest-multi " ,
7682 environment = envs ,
7783 command = "publish /pacts --consumer-app-version 1" ,
7884 )
You can’t perform that action at this time.
0 commit comments