mirror of
https://github.com/pawelmalak/flame.git
synced 2025-07-28 07:09:36 +02:00
fix integrations
This commit is contained in:
parent
e5154576b4
commit
e7cd4d7705
21 changed files with 125 additions and 63 deletions
24
utils/init/initIntegrationsApps.js
Normal file
24
utils/init/initIntegrationsApps.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
const { useKubernetes, useDocker } = require('../../controllers/apps/docker');
|
||||
const asyncWrapper = require('../../middleware/asyncWrapper');
|
||||
const loadConfig = require('../loadConfig');
|
||||
|
||||
const loadIntegrationsApps = asyncWrapper(async () => {
|
||||
const {
|
||||
dockerApps: useDockerAPI,
|
||||
kubernetesApps: useKubernetesAPI,
|
||||
} = await loadConfig();
|
||||
|
||||
let apps;
|
||||
|
||||
if (useDockerAPI) {
|
||||
await useDocker(apps);
|
||||
}
|
||||
|
||||
if (useKubernetesAPI) {
|
||||
await useKubernetes(apps);
|
||||
}
|
||||
|
||||
return apps;
|
||||
});
|
||||
|
||||
module.exports = loadIntegrationsApps;
|
Loading…
Add table
Add a link
Reference in a new issue