summaryrefslogtreecommitdiff
path: root/docker/usr/local/bin
diff options
context:
space:
mode:
authorRoelof Rietbroek (@grace) <roelof@geod.uni-bonn.de>2018-04-23 15:54:17 +0200
committerFrédéric Guillot <fred@kanboard.net>2018-04-30 11:33:14 -0700
commit93846ee99033084290e885b59b048635916955e5 (patch)
tree24657349d4b9475abbd5cc6ed3bc75f7d6ff4e0c /docker/usr/local/bin
parent0b475c18509c335087cc3158b5a7e616c1928286 (diff)
add SSL functionality to docker
Diffstat (limited to 'docker/usr/local/bin')
-rwxr-xr-xdocker/usr/local/bin/entrypoint.sh6
1 files changed, 6 insertions, 0 deletions
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