From 93846ee99033084290e885b59b048635916955e5 Mon Sep 17 00:00:00 2001 From: "Roelof Rietbroek (@grace)" Date: Mon, 23 Apr 2018 15:54:17 +0200 Subject: add SSL functionality to docker --- docker/usr/local/bin/entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docker/usr/local/bin/entrypoint.sh') diff --git a/docker/usr/local/bin/entrypoint.sh b/docker/usr/local/bin/entrypoint.sh index fe49c41b..61ce9207 100755 --- a/docker/usr/local/bin/entrypoint.sh +++ b/docker/usr/local/bin/entrypoint.sh @@ -1,5 +1,11 @@ #!/bin/bash +#generate a new self signed SSL certificate when none is provided in the volume +if [ ! -f /etc/nginx/ssl/kanboard.key ] || [ ! -f /etc/nginx/ssl/kanboard.crt ] +then + openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/nginx/ssl/kanboard.key -out /etc/nginx/ssl/kanboard.crt -subj "/C=GB/ST=London/L=London/O=Self Signed/OU=IT Department/CN=kanboard.org" +fi + chown -R nginx:nginx /var/www/app/data chown -R nginx:nginx /var/www/app/plugins -- cgit v1.2.3