Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix

Andras Bacsai54e0a9fc2822
diff --git a/apps/api/src/routes/webhooks/traefik/handlers.ts b/apps/api/src/routes/webhooks/traefik/handlers.ts
index 15fc93224a..b4fc4695dc 100644
--- a/apps/api/src/routes/webhooks/traefik/handlers.ts
+++ b/apps/api/src/routes/webhooks/traefik/handlers.ts
@@ -407,20 +407,22 @@ export async function traefikConfiguration(request, reply) {
}
}
} else {
- let port = found.services[oneService].ports[0]
- const foundPortVariable = serviceSetting.find((a) => a.name.toLowerCase() === 'port')
- if (foundPortVariable) {
- port = foundPortVariable.value
- }
- if (fqdn) {
- data.services.push({
- id: oneService,
- configuration: {
- port
- },
- fqdn,
- dualCerts,
- });
+ if (found.services[oneService].ports) {
+ let port = found.services[oneService].ports[0]
+ const foundPortVariable = serviceSetting.find((a) => a.name.toLowerCase() === 'port')
+ if (foundPortVariable) {
+ port = foundPortVariable.value
+ }
+ if (fqdn) {
+ data.services.push({
+ id: oneService,
+ configuration: {
+ port
+ },
+ fqdn,
+ dualCerts,
+ });
+ }
}
}
}