2
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
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