check for user before getting orgs, create default config

This commit is contained in:
Milo Schwartz 2024-10-22 23:58:00 -04:00
parent 6d9731f071
commit 717aa09daa
No known key found for this signature in database
6 changed files with 49 additions and 29 deletions

View file

@ -33,12 +33,6 @@ export function buildTraefikConfig(
const tls = {
certResolver: config.traefik.cert_resolver,
// domains: [ // TODO: figure out if this is neccessary
// {
// main: baseDomain,
// sans: ["*." + baseDomain],
// },
// ],
};
const http: any = {
@ -59,8 +53,8 @@ export function buildTraefikConfig(
},
};
for (const target of targets) {
const routerName = `router-${target.targetId}`;
const serviceName = `service-${target.targetId}`;
const routerName = `${target.targetId}-router`;
const serviceName = `${target.targetId}-service`;
http.routers![routerName] = {
entryPoints: [target.ssl ? config.traefik.https_entrypoint : config.traefik.https_entrypoint],