add SSL functionality to docker

This commit is contained in:
Roelof Rietbroek (@grace)
2018-04-23 15:54:17 +02:00
committed by Frédéric Guillot
parent 0b475c1850
commit 93846ee990
3 changed files with 15 additions and 2 deletions

View File

@@ -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