add directus

This commit is contained in:
Andras Bacsai
2023-01-10 15:30:10 +01:00
parent 1c98796e64
commit c37367d018
7 changed files with 2260 additions and 18 deletions

View File

@@ -156,7 +156,7 @@ const host = '0.0.0.0';
graceful.listen();
setInterval(async () => {
if (!scheduler.workers.has('deployApplication')) {
if (!scheduler.workers.has('deployApplication')) {
scheduler.run('deployApplication');
}
}, 2000);
@@ -225,16 +225,10 @@ async function getTagsTemplates() {
const { default: got } = await import('got');
try {
if (isDev) {
const remoteTags = await got.get('https://get.coollabs.io/coolify/service-tags.json').text();
const templates = await fs.readFile('./devTemplates.yaml', 'utf8');
const tags = await fs.readFile('./devTags.json', 'utf8');
if (tags !== remoteTags) {
await fs.writeFile('./tags.json', remoteTags);
await fs.writeFile('./devTags.json', remoteTags);
} else {
await fs.writeFile('./tags.json', tags);
}
await fs.writeFile('./templates.json', JSON.stringify(yaml.load(templates)));
await fs.writeFile('./tags.json', tags);
console.log('[004] Tags and templates loaded in dev mode...');
} else {
const tags = await got.get('https://get.coollabs.io/coolify/service-tags.json').text();