diff --git a/Dockerfile b/Dockerfile index 3265ae6..4e97430 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM httpd:2.4 +FROM httpd:2.4.48 LABEL Maintainer="Wolfgang Hottgenroth " LABEL ImageName="registry.hottis.de/dockerized/httpdispatcher" @@ -22,14 +22,17 @@ RUN \ -e 's,^#\(Include conf/extra/httpd-vhosts.conf\),Include conf/editable/httpd-vhosts.conf,' \ conf/httpd.conf && \ mkdir conf/editable && \ - mkdir conf/editable/ssl && \ - mkdir conf/editable/ssl/private && \ - mkdir conf/editable/ssl/certs + mkdir conf/ssl && \ + mkdir conf/ssl/private && \ + mkdir conf/ssl/certs && \ + mkdir conf/ssl/certs && \ + mkdir conf/ssl/notify COPY httpd-vhosts.conf-template conf/editable/ COPY notify.sh /usr/bin/ VOLUME /usr/local/apache2/conf/editable +VOLUME /usr/local/apache2/conf/ssl VOLUME /usr/local/apache2/logs EXPOSE 443/tcp diff --git a/httpd-vhosts.conf-template b/httpd-vhosts.conf-template index b2dce18..b4ff8ef 100644 --- a/httpd-vhosts.conf-template +++ b/httpd-vhosts.conf-template @@ -20,6 +20,9 @@ SSLSessionCacheTimeout 300 ServerAdmin admin@example.com MDCertificateAgreement accepted +MDNotifyCmd /usr/bin/notify.sh +MDStoreDir /usr/local/apache2/conf/ssl + # Example on usage on above LDAPAuthConfig macro diff --git a/notify.sh b/notify.sh index 8124ebc..3903134 100755 --- a/notify.sh +++ b/notify.sh @@ -1,6 +1,6 @@ -#!/bin/bash +#!/bin/sh -(sleep 5 && /bin/kill -USR1 1) & +date +%s > /usr/local/apache2/conf/ssl/notify/md-$1-done exit 0