浏览代码

mkcert -install is being called in the wrong place

There is no CA file to read  in order to call bin/setup-ssl-ca.

The `mkcert -install` is in the wrong place, it is nested within bin/setup-ssl-ca and it will never reach this unless the CA is already there.
Robert Nicklin 4 年之前
父节点
当前提交
5cba11a06e
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      compose/bin/setup-ssl

+ 4 - 1
compose/bin/setup-ssl

@@ -1,7 +1,10 @@
 #!/bin/bash
 [ -z "$1" ] && echo "Please specify a domain (ex. mydomain.test)" && exit
 
-# Generate certificate authority if not already setup
+# Generate a new local CA "/root/.local/share/mkcert"
+docker-compose exec -T -u root app mkcert -install
+
+# Read the CA install for requested hostname
 if ! docker-compose exec -T -u root app cat /root/.local/share/mkcert/rootCA.pem | grep -q 'BEGIN CERTIFICATE'; then
   bin/setup-ssl-ca
 fi