cleanup + arm support

This commit is contained in:
Andras Bacsai
2022-10-26 10:49:30 +02:00
parent eb0aa20fe1
commit 71496d5229
9 changed files with 82 additions and 2812 deletions

View File

@@ -70,11 +70,9 @@ const root: FastifyPluginAsync = async (fastify): Promise<void> => {
fastify.post<SaveServiceDestination>('/:id/configuration/destination', async (request, reply) => await saveServiceDestination(request, reply));
fastify.get<OnlyId>('/:id/usage', async (request) => await getServiceUsage(request));
// fastify.get<GetServiceLogs>('/:id/logs', async (request) => await getServiceLogs(request));
fastify.get<GetServiceLogs>('/:id/logs/:containerId', async (request) => await getServiceLogs(request));
fastify.post<ServiceStartStop>('/:id/start', async (request) => await startService(request));
fastify.post<ServiceStartStop>('/:id/:type/start', async (request) => await startService(request));
fastify.post<ServiceStartStop>('/:id/:type/stop', async (request) => await stopService(request));
fastify.post<ServiceStartStop & SetWordpressSettings & SetGlitchTipSettings>('/:id/:type/settings', async (request, reply) => await setSettingsService(request, reply));

View File

@@ -1,7 +1,6 @@
import { FastifyRequest } from "fastify";
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";
import { OnlyId } from "../../../types";
import { getTemplates } from "../../../lib/services";
@@ -363,7 +362,12 @@ export async function traefikConfiguration(request, reply) {
}
const services: any = await prisma.service.findMany({
where: { destinationDocker: { remoteEngine: false } },
include: includeServices,
include: {
destinationDocker: true,
persistentStorage: true,
serviceSecret: true,
serviceSetting: true,
},
orderBy: { createdAt: 'desc' },
});
@@ -849,7 +853,12 @@ export async function remoteTraefikConfiguration(request: FastifyRequest<OnlyId>
}
const services: any = await prisma.service.findMany({
where: { destinationDocker: { id } },
include: includeServices,
include: {
destinationDocker: true,
persistentStorage: true,
serviceSecret: true,
serviceSetting: true,
},
orderBy: { createdAt: 'desc' }
});