feat: properly handle dhparam

The dhparam file should be specific to each installation, and thus needs to be generated on first run.
This commit is contained in:
Jose Diaz-Gonzalez
2019-06-09 12:17:32 -04:00
parent 6fe984fd3c
commit 9b67ffe9d4
3 changed files with 13 additions and 0 deletions

View File

@@ -42,6 +42,15 @@ main() {
echo "dokku dokku/vhost_enable boolean true" | debconf-set-selections
dokku --quiet domains:set-global "$DOKKU_HOSTNAME"
fi
if [[ ! -f /mount/etc/nginx/dhparam.pem ]]; then
mkdir -p /mount/etc/nginx
openssl dhparam -out /mount/etc/nginx/dhparam.pem 2048
fi
cp -f /mount/etc/nginx/dhparam.pem /etc/nginx/dhparam.pem
chown root:root /etc/nginx/dhparam.pem
chown root:root /etc/nginx/conf.d
}
main "$@"