fix: skip ssl cert in case of error

This commit is contained in:
Andras Bacsai
2022-03-22 10:37:33 +01:00
parent 6b89857697
commit 927bf46304

View File

@@ -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) {