1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4066],{76662:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>l,frontMatter:()=>a,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"hub/installation/containers","title":"Install for Docker and container platforms","description":"Docker","source":"@site/docs/hub/installation/containers.md","sourceDirName":"hub/installation","slug":"/hub/installation/containers","permalink":"/docs/hub/installation/containers","draft":false,"unlisted":false,"editUrl":"https://github.com/webprofusion/certify-docs/edit/master/docs/hub/installation/containers.md","tags":[],"version":"current","frontMatter":{"id":"containers","title":"Install for Docker and container platforms"},"sidebar":"hubDocSidebar","previous":{"title":"Install and Upgrade Certify Management Hub","permalink":"/docs/hub/installation/"},"next":{"title":"Install for Windows","permalink":"/docs/hub/installation/windows"}}');var r=t(74848),s=t(28453);const a={id:"containers",title:"Install for Docker and container platforms"},c=void 0,o={},d=[{value:"Docker",id:"docker",level:3},{value:"Quick Start using Docker Compose (recommended)",id:"quick-start-using-docker-compose-recommended",level:4},{value:"Upgrading",id:"upgrading",level:5},{value:"Quick Start directly with Docker Run",id:"quick-start-directly-with-docker-run",level:4},{value:"Upgrading",id:"upgrading-1",level:5},{value:"Other common container environments",id:"other-common-container-environments",level:3},{value:"OpenShift",id:"openshift",level:4},{value:"Certify Management Agent",id:"certify-management-agent",level:2},{value:"Docker Example",id:"docker-example",level:3},{value:"Environment Variables",id:"environment-variables",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",h5:"h5",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h3,{id:"docker",children:"Docker"}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["Using ",(0,r.jsx)(n.a,{href:"https://docker.com/",children:"docker"})," to quickly try out ",(0,r.jsx)(n.em,{children:"Certify Management Hub"})," on any OS. This runs the hub services in a virtualized ",(0,r.jsx)(n.em,{children:"container"})," from an app ",(0,r.jsx)(n.em,{children:"image"}),' file. Upgrades just involve getting ("pulling") the latest image and recreating the container with that. Be sure to setup a data volume to retain your settings between upgrades.']})}),"\n",(0,r.jsxs)(n.p,{children:["A key thing to know about running apps in docker is that the container should be considered temporary (to be recreated later), so data should not be stored only within the container itself. To host the app in docker properly, you need to specify a persistent data volume to store configuration data (which by default is under ",(0,r.jsx)(n.code,{children:"/usr/share/certify"}),")."]}),"\n",(0,r.jsx)(n.h4,{id:"quick-start-using-docker-compose-recommended",children:"Quick Start using Docker Compose (recommended)"}),"\n",(0,r.jsxs)(n.p,{children:["Save this file as ",(0,r.jsx)(n.code,{children:"docker-compose.yaml"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yaml",children:'name: certify-management-hub\nservices:\n certify-hubservice:\n image: docker.io/certifytheweb/management-hub:latest\n ports:\n - "8080:8080"\n volumes:\n - certifydata:/usr/share/certify/\n restart: unless-stopped\nvolumes:\n certifydata:\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Then from the same path, run ",(0,r.jsx)(n.code,{children:"docker compose up -d"})," to start/restart the container."]}),"\n",(0,r.jsx)(n.h5,{id:"upgrading",children:"Upgrading"}),"\n",(0,r.jsx)(n.p,{children:"Using the latest version with docker compose is quick and easy:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Fetch the latest update with ",(0,r.jsx)(n.code,{children:"docker pull certifytheweb/management-hub:latest"})]}),"\n",(0,r.jsxs)(n.li,{children:["then restart your container (from the path where your above ",(0,r.jsx)(n.code,{children:"docker-compose.yaml"}
1)," is kept): ",(0,r.jsx)(n.code,{children:"docker compose up -d"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"quick-start-directly-with-docker-run",children:"Quick Start directly with Docker Run"}),"\n",(0,r.jsx)(n.p,{children:"Alternatively, to quickly try it out without using docker compose:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.code,{children:"docker run --name certify-management-hub -d -v /local/path/to/data:/usr/share/certify -p HOST_PORT:8080 --restart unless-stopped docker.io/certifytheweb/management-hub:latest"})}),"\n",(0,r.jsxs)(n.p,{children:["e.g. ",(0,r.jsx)(n.code,{children:"docker run --name certify-management-hub -d -v C:\\temp\\certifydata -p 8080:8080 --restart unless-stopped docker.io/certifytheweb/management-hub:latest"})]}),"\n",(0,r.jsx)(n.h5,{id:"upgrading-1",children:"Upgrading"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Fetch the latest update with ",(0,r.jsx)(n.code,{children:"docker pull certifytheweb/management-hub:latest"})," then recreate your container."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"other-common-container-environments",children:"Other common container environments"}),"\n",(0,r.jsx)(n.p,{children:"For simplest setup you can fetch the combined Certify Management Hub image from:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Docker Hub: ",(0,r.jsx)(n.a,{href:"https://hub.docker.com/r/certifytheweb/management-hub",children:"https://hub.docker.com/r/certifytheweb/management-hub"})]}),"\n",(0,r.jsxs)(n.li,{children:["GitHub Packages: ",(0,r.jsx)(n.a,{href:"https://github.com/certifytheweb?tab=packages",children:"https://github.com/certifytheweb?tab=packages"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"openshift",children:"OpenShift"}),"\n",(0,r.jsxs)(n.p,{children:["Add Storage > persistent volume claim ",(0,r.jsx)(n.code,{children:"certifydata"})," with mount path ",(0,r.jsx)(n.code,{children:"/usr/share/certifydata"}),", see also ",(0,r.jsx)(n.code,{children:"CERTIFY_APP_DATA"})," below."]}),"\n",(0,r.jsx)(n.h2,{id:"certify-management-agent",children:"Certify Management Agent"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/hub/guides/agent",children:"Certify Management Agent"})," is a version of the ",(0,r.jsx)(n.em,{children:"Certify Certificate Manager"}),' service which can run "headless" (with no UI) on many different platforms.']}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Docker Hub: ",(0,r.jsx)(n.a,{href:"https://hub.docker.com/r/certifytheweb/certify-agent",children:"https://hub.docker.com/r/certifytheweb/certify-agent"})]}),"\n",(0,r.jsxs)(n.li,{children:["GitHub Packages: ",(0,r.jsx)(n.a,{href:"https://github.com/certifytheweb?tab=packages",children:"https://github.com/certifytheweb?tab=packages"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"docker-example",children:"Docker Example"}),"\n",(0,r.jsx)(n.p,{children:"To run an instance of the agent and point it to your management hub, with a preset joining secret:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'docker run docker.io/certifytheweb/certify-agent:latest -v <your data path>:/usr/share/certify -e CERTIFY_MANAGEMENT_HUB=https://<your hub API> -e CERTIFY_MANAGEMENT_HUB_CLIENT_ID= "managedinstance_sp_01" -e CERTIFY_MANAGEMENT_HUB_CLIENT_SECRET= "<your client secret>" -e CERTIFY_MANAGEMENT_HUB_AUTOJOIN= "true"\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Where ",(0,r.jsx)(n.code,{children:"your data path"})," is a path on your host machine where you will store settings, e.g. ",(0,r.jsx)(n.code,{children:"/Users/macos/certifydata"})," or ",(0,r.jsx)(n.code,{children:"C:\\CertifyData"})," - you can make these paths anything you like depending on your requirements. The key thing is that when you update the container you will run it with the same path in order to use the same settings again."]}),"\n",(0,r.jsx)(n.h2,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,r.jsx)(n.p,{children:"You can optionally specify environment variables to modify the default config:"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"CERTIFY_MANAGEMENT_HUB"})," : Specify the management hub API URL when working with multiple containers e.g. ",(0,r.jsx)(n.code,{children:"http://certify-api:8080"})]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"CERTIFY_MANAGEMENT_HUB_CLIENT_ID"})," : Specify the management hub joining secret Client ID"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"CERTIFY_MANAGEMENT_HUB_CLIENT_SECRET"})," : Specify the management hub joining secret"]}
1),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"CERTIFY_MANAGEMENT_HUB_AUTOJOIN"})," : Set to ",(0,r.jsx)(n.code,{children:'"true"'})," to tell the instance to automatically attempt to join the specified hub"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"CERTIFY_ADMIN_DEFAULTUSERNAME"})," : Override the initial default ",(0,r.jsx)(n.code,{children:"admin"})," username. Only has an effect on initial setup."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"CERTIFY_ADMIN_DEFAULTPWD"}),": Override the initial default admin password of ",(0,r.jsx)(n.code,{children:"changeme!"}),". Only has an effect on initial setup."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"CERTIFY_APP_DATA"})," : Specify an alternative path to store core service settings."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"CERTIFY_SERVICE_HOST"})," : Specify the backend agent host when working with multiple containers."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"CERTIFY_SERVICE_PORT"}),": Specify the backend agent port when working with multiple containers."]})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>c});var i=t(96540);const r={},s=i.createContext(r);function a(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]);
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.