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

@@ -1,4 +1,4 @@
import { createDirectories, getServiceFromDB, getServiceImage, getServiceMainPort, isDev, makeLabelForServices } from "./common";
import { isDev } from "./common";
import fs from 'fs/promises';
export async function getTemplates() {
let templates: any = [];
@@ -141,21 +141,3 @@ export async function getTemplates() {
// }
return templates
}
export async function defaultServiceConfigurations({ id, teamId }) {
const service = await getServiceFromDB({ id, teamId });
const { destinationDockerId, destinationDocker, type, serviceSecret } = service;
const network = destinationDockerId && destinationDocker.network;
const port = getServiceMainPort(type);
const { workdir } = await createDirectories({ repository: type, buildId: id });
const image = getServiceImage(type);
let secrets = [];
if (serviceSecret.length > 0) {
serviceSecret.forEach((secret) => {
secrets.push(`${secret.name}=${secret.value}`);
});
}
return { ...service, network, port, workdir, image, secrets }
}