Merge pull request #2554 from dokku/2480-add-ssl-ports
Add ssl ports when generating a self-signed certificate
This commit is contained in:
commit
a22f6596dc
2 files changed
+4
-4
No files matched your search
@@ -72,7 +72,6 @@ certs_set() {
|
|||||||
cp "$KEY_FILE" "$APP_SSL_PATH/server.key"
|
cp "$KEY_FILE" "$APP_SSL_PATH/server.key"
|
||||||
chmod 750 "$APP_SSL_PATH"
|
chmod 750 "$APP_SSL_PATH"
|
||||||
chmod 640 "$APP_SSL_PATH/server.crt" "$APP_SSL_PATH/server.key"
|
chmod 640 "$APP_SSL_PATH/server.crt" "$APP_SSL_PATH/server.key"
|
||||||
cd "$DOKKU_ROOT"
|
|
||||||
plugn trigger post-certs-update "$APP"
|
plugn trigger post-certs-update "$APP"
|
||||||
plugn trigger post-domains-update "$APP"
|
plugn trigger post-domains-update "$APP"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,14 +22,15 @@ certs_generate_cmd() {
|
|||||||
|
|
||||||
mkdir -p "$APP_SSL_PATH"
|
mkdir -p "$APP_SSL_PATH"
|
||||||
dokku_log_info1 "Installing certificate and key..."
|
dokku_log_info1 "Installing certificate and key..."
|
||||||
mv -f "$CERTS_GENERATE_TMP_WORK_DIR/server.key" "$CERTS_GENERATE_TMP_WORK_DIR/server.crt" "$APP_SSL_PATH"
|
mv -f "$CERTS_GENERATE_TMP_WORK_DIR/server.crt" "$CERTS_GENERATE_TMP_WORK_DIR/server.csr" "$CERTS_GENERATE_TMP_WORK_DIR/server.key" "$APP_SSL_PATH"
|
||||||
chmod 750 "$APP_SSL_PATH"
|
chmod 750 "$APP_SSL_PATH"
|
||||||
chmod 640 "$APP_SSL_PATH/server.key" "$APP_SSL_PATH/server.crt"
|
chmod 640 "$APP_SSL_PATH/server.crt" "$APP_SSL_PATH/server.csr" "$APP_SSL_PATH/server.key"
|
||||||
|
plugn trigger post-certs-update "$APP"
|
||||||
[[ -n "$DOMAIN" ]] && (domains_add "$APP" "$DOMAIN" || plugn trigger post-domains-update "$APP")
|
[[ -n "$DOMAIN" ]] && (domains_add "$APP" "$DOMAIN" || plugn trigger post-domains-update "$APP")
|
||||||
dokku_log_info1 "The following is a certificate signing request that can be used"
|
dokku_log_info1 "The following is a certificate signing request that can be used"
|
||||||
dokku_log_info1 "to generate an 'officially' signed SSL certificate for $APP at $DOMAIN"
|
dokku_log_info1 "to generate an 'officially' signed SSL certificate for $APP at $DOMAIN"
|
||||||
dokku_log_info1 "by a CA of your choosing."
|
dokku_log_info1 "by a CA of your choosing."
|
||||||
cat server.csr
|
cat "$APP_SSL_PATH/server.csr"
|
||||||
else
|
else
|
||||||
dokku_log_info1 "$APP has an SSL endpoint already defined"
|
dokku_log_info1 "$APP has an SSL endpoint already defined"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user