fix: skip ssl cert in case of error
This commit is contained in:
@@ -103,6 +103,7 @@ export async function generateSSLCerts() {
|
|||||||
orderBy: { createdAt: 'desc' }
|
orderBy: { createdAt: 'desc' }
|
||||||
});
|
});
|
||||||
for (const application of applications) {
|
for (const application of applications) {
|
||||||
|
try {
|
||||||
const {
|
const {
|
||||||
fqdn,
|
fqdn,
|
||||||
id,
|
id,
|
||||||
@@ -132,6 +133,9 @@ export async function generateSSLCerts() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(`Error during generateSSLCerts with ${application.fqdn}: ${error}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const services = await db.prisma.service.findMany({
|
const services = await db.prisma.service.findMany({
|
||||||
include: {
|
include: {
|
||||||
@@ -145,6 +149,7 @@ export async function generateSSLCerts() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
for (const service of services) {
|
for (const service of services) {
|
||||||
|
try {
|
||||||
const {
|
const {
|
||||||
fqdn,
|
fqdn,
|
||||||
id,
|
id,
|
||||||
@@ -160,6 +165,9 @@ export async function generateSSLCerts() {
|
|||||||
if (isHttps) ssls.push({ domain, id, isCoolify: false });
|
if (isHttps) ssls.push({ domain, id, isCoolify: false });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(`Error during generateSSLCerts with ${service.fqdn}: ${error}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const { fqdn } = await db.prisma.setting.findFirst();
|
const { fqdn } = await db.prisma.setting.findFirst();
|
||||||
if (fqdn) {
|
if (fqdn) {
|
||||||
|
|||||||
Reference in New Issue
Block a user