diff --git a/server/lib/traefik/getTraefikConfig.ts b/server/lib/traefik/getTraefikConfig.ts index 06754ffa2..1ce594dc8 100644 --- a/server/lib/traefik/getTraefikConfig.ts +++ b/server/lib/traefik/getTraefikConfig.ts @@ -477,7 +477,10 @@ export async function getTraefikConfig( // TODO: HOW TO HANDLE ^^^^^^ BETTER const anySitesOnline = targets.some( - (target) => target.site.online + (target) => + target.site.online || + target.site.type === "local" || + target.site.type === "wireguard" ); return ( @@ -490,7 +493,7 @@ export async function getTraefikConfig( if (target.health == "unhealthy") { return false; } - + // If any sites are online, exclude offline sites if (anySitesOnline && !target.site.online) { return false; @@ -605,7 +608,10 @@ export async function getTraefikConfig( servers: (() => { // Check if any sites are online const anySitesOnline = targets.some( - (target) => target.site.online + (target) => + target.site.online || + target.site.type === "local" || + target.site.type === "wireguard" ); return targets @@ -613,7 +619,7 @@ export async function getTraefikConfig( if (!target.enabled) { return false; } - + // If any sites are online, exclude offline sites if (anySitesOnline && !target.site.online) { return false; diff --git a/server/private/lib/traefik/getTraefikConfig.ts b/server/private/lib/traefik/getTraefikConfig.ts index f0343c5d4..3f6c5fdc2 100644 --- a/server/private/lib/traefik/getTraefikConfig.ts +++ b/server/private/lib/traefik/getTraefikConfig.ts @@ -665,7 +665,10 @@ export async function getTraefikConfig( // TODO: HOW TO HANDLE ^^^^^^ BETTER const anySitesOnline = targets.some( - (target) => target.site.online + (target) => + target.site.online || + target.site.type === "local" || + target.site.type === "wireguard" ); return ( @@ -793,7 +796,10 @@ export async function getTraefikConfig( servers: (() => { // Check if any sites are online const anySitesOnline = targets.some( - (target) => target.site.online + (target) => + target.site.online || + target.site.type === "local" || + target.site.type === "wireguard" ); return targets diff --git a/src/components/ContainersSelector.tsx b/src/components/ContainersSelector.tsx index 5a0f49f99..d4ba6c437 100644 --- a/src/components/ContainersSelector.tsx +++ b/src/components/ContainersSelector.tsx @@ -171,8 +171,7 @@ const DockerContainersTable: FC<{ ...Object.values(container.networks) .map((n) => n.ipAddress) .filter(Boolean), - ...getExposedPorts(container).map((p) => p.toString()), - ...Object.entries(container.labels).flat() + ...getExposedPorts(container).map((p) => p.toString()) ]; return searchableFields.some((field) => diff --git a/src/components/newt-install-commands.tsx b/src/components/newt-install-commands.tsx index 5a252f0d5..ba0363e3b 100644 --- a/src/components/newt-install-commands.tsx +++ b/src/components/newt-install-commands.tsx @@ -101,6 +101,7 @@ export function NewtSiteInstallCommands({ `helm install newt fossorial/newt \\ --create-namespace \\ --set newtInstances[0].name="main-tunnel" \\ + --set newtInstances[0].enabled=true \\ --set-string newtInstances[0].auth.keys.endpointKey="${endpoint}" \\ --set-string newtInstances[0].auth.keys.idKey="${id}" \\ --set-string newtInstances[0].auth.keys.secretKey="${secret}"` @@ -185,59 +186,72 @@ WantedBy=default.target` className="mt-4" /> -
-

- {t("siteConfiguration")} -

-
- { - const value = checked as boolean; - setAcceptClients(value); - }} - label={t("siteAcceptClientConnections")} - /> -
-

- {t("siteAcceptClientConnectionsDescription")} -

+
+

{t("siteConfiguration")}

+
+ { + const value = checked as boolean; + setAcceptClients(value); + }} + label={t("siteAcceptClientConnections")} + />
+

+ {t("siteAcceptClientConnectionsDescription")} +

+
-
-

{t("commands")}

-
- {commands.map((item, index) => { - const commandText = - typeof item === "string" - ? item - : item.command; - const title = - typeof item === "string" - ? undefined - : item.title; +
+

{t("commands")}

+ {platform === "kubernetes" && ( +

+ For more and up to date Kubernetes installation + information, see{" "} + + docs.pangolin.net/manage/sites/install-kubernetes + + . +

+ )} +
+ {commands.map((item, index) => { + const commandText = + typeof item === "string" ? item : item.command; + const title = + typeof item === "string" + ? undefined + : item.title; - return ( -
- {title && ( -

- {title} -

- )} - -
- ); - })} -
+ const key = `${title ?? ""}::${commandText}`; + + return ( +
+ {title && ( +

+ {title} +

+ )} + +
+ ); + })}
+
);