This commit is contained in:
Andras Bacsai
2022-10-26 10:27:33 +02:00
parent c34de3d0a3
commit eb0aa20fe1
5 changed files with 34 additions and 43 deletions

View File

@@ -1,5 +1,5 @@
import { FastifyRequest } from "fastify";
import { errorHandler, getDomain, isDev, prisma, executeDockerCmd } from "../../../lib/common";
import { errorHandler, getDomain, isDev, prisma, executeDockerCmd, fixType } from "../../../lib/common";
import { supportedServiceTypesAndVersions } from "../../../lib/services/supportedVersions";
import { includeServices } from "../../../lib/services/common";
import { TraefikOtherConfiguration } from "./types";
@@ -378,8 +378,7 @@ export async function traefikConfiguration(request, reply) {
} = service;
if (destinationDockerId) {
const templates = await getTemplates();
let found = templates.find((a) => a.name === type);
type = type.toLowerCase();
let found = templates.find((a) => fixType(a.name) === fixType(type));
if (found) {
found = JSON.parse(JSON.stringify(found).replaceAll('$$id', id));
for (const oneService of Object.keys(found.services)) {