diff --git a/Makefile b/Makefile index 7341175..ac3853f 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ webapp_download_version = $(shell ./version.sh webapp) COMPONENT = $(shell echo $(component) | tr a-z A-Z) -build-all: build-base build-core build-webapp +build-all: build-ssl build-base build-core build-webapp build: component ?= base build: @@ -26,6 +26,9 @@ build-core: build-webapp: component=webapp make build +build-ssl: + docker build -t $(docker_repo)/kopano_ssl ssl/ + tag: component ?= base tag: @echo 'create tag $($(component)_version)' @@ -48,7 +51,7 @@ tag-webapp: repo-login: docker login -u $(docker_login) -p $(docker_pwd) -publish: repo-login publish-base publish-core publish-webapp +publish: repo-login publish-ssl publish-base publish-core publish-webapp git push git push origin --tags @@ -66,3 +69,6 @@ publish-core: build-core tag-core publish-webapp: build-webapp tag-webapp component=webapp make publish-container + +publish-ssl: build-ssl + docker push $(docker_repo)/kopano_ssl:latest diff --git a/ssl/gencerts.sh b/ssl/gencerts.sh index 32fa802..5cf8305 100644 --- a/ssl/gencerts.sh +++ b/ssl/gencerts.sh @@ -2,8 +2,9 @@ echo "Creating CA and Server certificates..." -easypki create --filename internalca --organizational-unit primary --expire 3650 --ca "Internal Kopano System" +easypki create --filename internalca --organizational-unit primary --expire 3650 --ca "Internal Kopano System" +mkdir -p /kopano/ssl/clients/ cp /kopano/easypki/internalca/certs/internalca.crt /kopano/ssl/ca.pem for s in kserver kdagent kmonitor ksearch kspooler kwebapp @@ -14,4 +15,4 @@ for s in kserver kdagent kmonitor ksearch kspooler kwebapp openssl x509 -in /kopano/easypki/internalca/certs/$s.crt -pubkey -noout > /kopano/ssl/clients/$s-public.pem done -ls -l /kopano/ssl/*.pem \ No newline at end of file +ls -l /kopano/ssl/*.pem diff --git a/ssl/start.sh b/ssl/start.sh index 04e22ac..087ce45 100644 --- a/ssl/start.sh +++ b/ssl/start.sh @@ -1,8 +1,7 @@ #!/bin/sh - -if [ -f /kopano/ssl/ca.pem ] - then exit 0 +if [ -f /kopano/ssl/ca.pem ]; then + exit 0 fi /gencerts.sh