This commit is contained in:
Andras Bacsai 2023-02-21 12:45:22 +01:00
parent b777e08542
commit f0d89f850e
2 changed files with 3 additions and 2 deletions

View File

@ -1048,7 +1048,7 @@ export function generateDatabaseConfiguration(database: any): DatabaseConfigurat
}
export function isARM() {
const arch = process.arch;
if (arch === 'arm' || arch === 'arm64') {
if (arch === 'arm' || arch === 'arm64' || arch === 'aarch' || arch === 'aarch64') {
return true;
}
return false;

View File

@ -82,13 +82,14 @@ export async function startService(request: FastifyRequest<ServiceStartStop>, fa
}
}
}
console.log({ newEnvironments })
const customVolumes = await prisma.servicePersistentStorage.findMany({ where: { serviceId: id } })
let volumes = new Set()
if (arm && template.services[s]?.volumesArm?.length > 0) {
template.services[s].volumesArm.forEach(v => volumes.add(v))
}
if (!arm && template.services[s]?.volumes?.length > 0) {
template.services[s]?.volumes && template.services[s].volumes.length > 0 && template.services[s].volumes.forEach(v => volumes.add(v))
template.services[s].volumes.forEach(v => volumes.add(v))
}
// Workaround: old plausible analytics service wrong volume id name