PageSourceSearch

https://docs-pactflow-preview.netlify.app/assets/js/6567f0cf.ef6e11c7.js

js docs-pactflow-preview.netlify.app collected 2026-10-03 10:41:38 UTC 10,707 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkpartners=self.webpackChunkpartners||[]).push([[19980],{15680:(e,t,o)=>{o.d(t,{xA:()=>c,yg:()=>g});var n=o(96540);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function i(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},a=Object.keys(e);for(n=0;n<a.length;n++)o=a[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)o=a[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var l=n.createContext({}),p=function(e){var t=n.useContext(l),o=t;return e&&(o="function"==typeof e?e(t):s(s({},t),e)),o},c=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var o=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),u=p(o),m=r,g=u["".concat(l,".").concat(m)]||u[m]||d[m]||a;return o?n.createElement(g,s(s({ref:t},c),{},{components:o})):n.createElement(g,s({ref:t},c))}));function g(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=o.length,s=new Array(a);s[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:r,s[1]=i;for(var p=2;p<a;p++)s[p]=o[p];return n.createElement.apply(null,s)}return n.createElement.apply(null,o)}m.displayName="MDXCreateElement"},85672:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>a,metadata:()=>i,toc:()=>p});var n=o(58168),r=(o(96540),o(15680));const a={title:"Docker Compose example"},s=void 0,i={unversionedId:"docs/on-premises-2x/docker-compose-example",id:"docs/on-premises-2x/docker-compose-example",title:"Docker Compose example",description:"In this guide, we'll provide an example docker compose setup so that you can see how all of the bits hang together. We will demonstrate:",source:"@site/docs/docs/on-premises-2x/docker-compose-example.md",sourceDirName:"docs/on-premises-2x",slug:"/docs/on-premises-2x/docker-compose-example",permalink:"/docs/on-premises-2x/docker-compose-example",draft:!1,editUrl:"https://github.com/pactflow/docs.pactflow.io/edit/master/website/docs/docs/on-premises-2x/docker-compose-example.md",tags:[],version:"current",lastUpdatedBy:"Matt Fellows",lastUpdatedAt:1751508618,formattedLastUpdatedAt:"Jul 3, 2025",frontMatter:{title:"Docker Compose example"},sidebar:"onprem",previous:{title:"License file",permalink:"/docs/on-premises-2x/license"},next:{title:"Load Testing",permalink:"/docs/on-premises-2x/installation/load-testing"}},l={},p=[{value:"1. Authenticating to Quay.io",id:"1-authenticating-to-quayio",level:2},{value:"2. PactFlow license file",id:"2-pactflow-license-file",level:2},{value:"3. Startup PactFlow and supporting services",id:"3-startup-pactflow-and-supporting-services",level:2},{value:"3. Login to PactFlow",id:"3-login-to-pactflow",level:2}],c={toc:p},u="wrapper";function d(e){let{components:t,...o}=e;return(0,r.yg)(u,(0,n.A)({},c,o,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("p",null,"In this guide, we'll provide an example ",(0,r.yg)("inlineCode",{parentName:"p"},"docker compose")," setup so that you can see how all of the bits hang together. We will demonstrate:"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"Authenticating to Quay.io"),(0,r.yg)("li",{parentName:"ul"},"Running the PactFlow enterprise container"),(0,r.yg)("li",{parentName:"ul"},"Persistent storage with a postgres database")),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"Pre-requsites")),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://docs.docker.com/engine/install/"},"Docker")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("a",{parentName:"li",href:"https://docs.docker.com/compose/install/"},"Docker Compose")),(0,r.yg)("li",{parentName:"ul"},"A working *nix environment and access to a terminal"),(0,r.yg)("li",{parentName:"ul"},"Valid credentials to authenticate to our ",(0,r.yg)("a",{parentName:"li",href:"docker-image-registry"},"Docker image registry")),(0,r.yg)("li",{parentName:"ul"},"PactFlow license file")),(0,r.yg)("h2",{id:"1-authenticating-to-quayio"},"1. Authenticating to Quay.io"),(0,r.yg)("p",null,"After obtaining valid robot credentials, you need to authenticate to Quay.io so that the docker engine is able to fetch our images."),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},'docker login -u="<username>" -p="<password>" quay.io\ndocker pull quay.io/pactflow/enterprise\n')),(0,r.yg)("p",null,"After this, you should have the latest PactFlow enterprise image on your machine. You can verify by executing"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"docker images quay.io/pactflow/enterprise\n")),(0,r.yg)("p",null,"Which should produce an output such as:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-sh"},"> docker images quay.io/pactflow/enterprise\nREPOSITORY                    TAG                 IMAGE ID            CREATED             SIZE\nquay.io/pactflow/enterprise   2.0.0               32db429fda01        1 day ago           462MB # <- this guide applies to 2.x.x ver
1sion\nquay.io/pactflow/enterprise   latest              32db429fda01        1 day ago           462MB\nquay.io/pactflow/enterprise   1.36.0              7f9b3c3aa50e        7 weeks ago         454MB\n")),(0,r.yg)("h2",{id:"2-pactflow-license-file"},"2. PactFlow license file"),(0,r.yg)("p",null,"The PactFlow on-premises version requires a license file to run. You should have received this from us during the\non-boarding process. If not, please contact your Account Manager."),(0,r.yg)("p",null,"Save the license file into a temporary directory with the name ",(0,r.yg)("inlineCode",{parentName:"p"},"pactflow-onprem.lic")," (it needs to be the same directory as used in step 3)."),(0,r.yg)("h2",{id:"3-startup-pactflow-and-supporting-services"},"3. Startup PactFlow and supporting services"),(0,r.yg)("p",null,"Save the below file as ",(0,r.yg)("inlineCode",{parentName:"p"},"docker-compose.yml")," in the same directory as the license file and then run ",(0,r.yg)("inlineCode",{parentName:"p"},"docker-compose up"),":"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-yaml"},'version: "3"\n\nservices:\n  pactflow:\n    image: quay.io/pactflow/enterprise:latest\n    depends_on:\n      - postgres\n      - redis\n    environment:\n      # This is set to localhost for this example but in a real deployment, this needs to be set to the actual URL of the application\n      - PACTFLOW_BASE_URL=http://localhost\n      # Insecure setting only for the purposes of this demo! Not to be used in production.\n      - PACTFLOW_DATABASE_SSLMODE=disable\n      # Insecure setting only for the purposes of this demo! Not to be used in production.\n      - PACTFLOW_REQUIRE_HTTPS=false\n      # Demo auth should only be used for demo purposes. Not to be used in production.\n      - PACTFLOW_DEMO_AUTH_ENABLED=true\n      # \'Allow all\' for the webhook host whitelist should only be used for demo purposes. See docs for configuring this in production.\n      - PACTFLOW_WEBHOOK_HOST_WHITELIST=/.*/\n      - PACTFLOW_HTTP_PORT=9292\n      # Link to the postgres database\n      - PACTFLOW_DATABASE_URL=postgres://postgres:password@postgres/postgres\n      - PACTFLOW_LOG_LEVEL=info\n      - PACTFLOW_ADMIN_API_KEY=admin\n      - PACTFLOW_MASTER_ENCRYPTION_KEY=thisissomerandombytes\n      - PACTFLOW_COOKIE_SECRET=at-least-64-char-secret---------at-least-64-char-secret---------\n      - PACT_BROKER_ADMIN_API_KEY=admin \n      - PACTFLOW_HTTP_LOGGING_ENABLED=true\n      # Link to the redis cache\n      - REDIS_URL=redis://redis:6379\n    ports:\n      - "80:9292"\n    healthcheck:\n      test: ["CMD", "supervisorctl", "status", "haproxy", "marko", "pactflow"]\n      interval: 30s\n      timeout: 10s\n      retries: 3\n    volumes:\n      - ./pactflow-onprem.lic:/home/pactflow-onprem.lic\n\n  postgres:\n    image: postgres:13-alpine\n    healthcheck:\n      test: psql postgres --command "select 1" -U postgres\n    volumes:\n      - postgres-volume:/var/lib/postgresql/data\n    environment:\n      POSTGRES_USER: postgres\n      POSTGRES_PASSWORD: password\n      POSTGRES_DB: postgres\n\n  redis:\n    image: redis:latest\n\nvolumes:\n  postgres-volume:\n')),(0,r.yg)("p",null,"You can verify all services by running ",(0,r.yg)("inlineCode",{parentName:"p"},"docker ps"),":"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},'CONTAINER ID   IMAGE                                          COMMAND                  CREATED          STATUS                    PORTS                  NAMES\n1cefdf8b1e1b   quay.io/pactflow/enterprise:2.0.0              "docker-entrypoint"      24 minutes ago   Up 24 minutes (healthy)   0.0.0.0:80->9292/tcp   tmp_pactflow_1\n6bedae5936dc   redis:latest                                   "docker-entrypoint.s\u2026"   2 hours ago      Up 24 minutes             6379/tcp               tmp_redis_1\n8b393d35a20c   postgres:13-alpine                             "docker-entrypoint.s\u2026"   9 days ago       Up 24 minutes (healthy)   5432/tcp               tmp_postgres_1\n')),(0,r.yg)("h2",{id:"3-login-to-pactflow"},"3. Login to PactFlow"),(0,r.yg)("p",null,"Head to ",(0,r.yg)("a",{parentName:"p",href:"http://localhost"},"http://localhost")," in your browser, and choose to login with \"PACTFLOW DEMO AUTH\". Provide a name and email address to create your account and login. (The details don't need to be valid, and won't be used to send any emails.)"),(0,r.yg)("p",null,"That's it \ud83c\udf89."),(0,r.yg)("p",null,"For production use, you'll need to replicate this setup using a proper container orchestration tool, such as Kubernetes, AWS ECS/Fargate, AKS, GKE, Mesos etc, and your real Identity Provider."))}d.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.