[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2025-10-25 07:11:54 +00:00
committed by GitHub
parent 84d311802f
commit 90bd276ad4
7 changed files with 23 additions and 12 deletions

View File

@@ -7,7 +7,7 @@ describe("createDomainLabels", () => {
const baseDomain: Domain = {
host: "example.com",
port: 8080,
customEntrypoint: null,
customEntrypoint: null,
https: false,
uniqueConfigKey: 1,
customCertResolver: null,
@@ -272,7 +272,7 @@ describe("createDomainLabels", () => {
"traefik.http.routers.test-app-1-custom.entrypoints=custom",
"traefik.http.services.test-app-1-custom.loadbalancer.server.port=8080",
"traefik.http.routers.test-app-1-custom.service=test-app-1-custom",
"traefik.http.routers.test-app-1-custom.tls.certresolver=letsencrypt",
"traefik.http.routers.test-app-1-custom.tls.certresolver=letsencrypt",
]);
});
});

View File

@@ -123,7 +123,7 @@ const baseDomain: Domain = {
https: false,
path: null,
port: null,
customEntrypoint: null,
customEntrypoint: null,
serviceName: "",
composeId: "",
customCertResolver: null,

View File

@@ -281,7 +281,7 @@ export const ImpersonationBar = () => {
<div className="flex items-center gap-4 flex-1 flex-wrap">
<Avatar className="h-10 w-10">
<AvatarImage
className="object-cover"
className="object-cover"
src={data?.user?.image || ""}
alt={data?.user?.name || ""}
/>

View File

@@ -44,7 +44,7 @@ export const UserNav = () => {
>
<Avatar className="h-8 w-8 rounded-lg">
<AvatarImage
className="object-cover"
className="object-cover"
src={data?.user?.image || ""}
alt={data?.user?.image || ""}
/>

View File

@@ -31,7 +31,7 @@ export const domains = pgTable("domain", {
host: text("host").notNull(),
https: boolean("https").notNull().default(false),
port: integer("port").default(3000),
customEntrypoint: text("customEntrypoint"),
customEntrypoint: text("customEntrypoint"),
path: text("path").default("/"),
serviceName: text("serviceName"),
domainType: domainType("domainType").default("application"),
@@ -77,7 +77,7 @@ export const apiCreateDomain = createSchema.pick({
host: true,
path: true,
port: true,
customEntrypoint: true,
customEntrypoint: true,
https: true,
applicationId: true,
certificateType: true,
@@ -113,7 +113,7 @@ export const apiUpdateDomain = createSchema
host: true,
path: true,
port: true,
customEntrypoint: true,
customEntrypoint: true,
https: true,
certificateType: true,
customCertResolver: true,

View File

@@ -220,7 +220,11 @@ export const addDomainToCompose = async (
throw new Error(`The service ${serviceName} not found in the compose`);
}
const httpLabels = createDomainLabels(appName, domain, domain.customEntrypoint || "web");
const httpLabels = createDomainLabels(
appName,
domain,
domain.customEntrypoint || "web",
);
if (domain.customEntrypoint == null && https) {
const httpsLabels = createDomainLabels(appName, domain, "websecure");
httpLabels.push(...httpsLabels);
@@ -304,7 +308,7 @@ export const createDomainLabels = (
const {
host,
port,
customEntrypoint,
customEntrypoint,
https,
uniqueConfigKey,
certificateType,

View File

@@ -112,8 +112,15 @@ export const createRouterConfig = async (
const { appName, redirects, security } = app;
const { certificateType } = domain;
const { host, path, https, uniqueConfigKey, internalPath, stripPath, customEntrypoint } =
domain;
const {
host,
path,
https,
uniqueConfigKey,
internalPath,
stripPath,
customEntrypoint,
} = domain;
const routerConfig: HttpRouter = {
rule: `Host(\`${host}\`)${path !== null && path !== "/" ? ` && PathPrefix(\`${path}\`)` : ""}`,
service: `${appName}-service-${uniqueConfigKey}`,