cleanup stuffs

This commit is contained in:
Andras Bacsai committed 2022-10-27 09:55:32 +02:00
1 parent 4416646954
commit 2030f714fa
18 files changed
+130 -160

No files matched your search

-2
View File
@@ -15,5 +15,3 @@ apps/api/db/migration.db-journal
apps/api/core*
logs
others/certificates
apps/api/template.json
apps/api/tags.json
+1 -3
View File
@@ -26,8 +26,6 @@
"@iarna/toml": "2.2.5",
"@ladjs/graceful": "3.0.2",
"@prisma/client": "4.5.0",
"prisma": "4.5.0",
"axios": "1.1.3",
"bcryptjs": "2.4.3",
"bree": "9.1.2",
"cabin": "9.1.2",
@@ -51,6 +49,7 @@
"node-os-utils": "1.3.7",
"p-all": "4.0.0",
"p-throttle": "5.0.0",
"prisma": "4.5.0",
"public-ip": "6.0.1",
"pump": "^3.0.0",
"ssh-config": "4.1.6",
@@ -58,7 +57,6 @@
"unique-names-generator": "4.7.1"
},
"devDependencies": {
"semver-sort": "1.0.0",
"@types/node": "18.11.6",
"@types/node-os-utils": "1.3.0",
"@typescript-eslint/eslint-plugin": "5.41.0",
-13
View File
@@ -1,7 +1,6 @@
import fs from 'fs/promises';
import yaml from 'js-yaml';
import got from 'got';
import semverSort from 'semver-sort';
const repositories = [];
const templates = await fs.readFile('../devTemplates.yaml', 'utf8');
@@ -31,9 +30,6 @@ for (const repository of repositories) {
if (!tags.includes('latest')) {
tags.push('latest')
}
try {
tags = semverSort.desc(tags)
} catch (error) { }
services.push({ name: repository.name, image: repository.image, tags })
}
} else {
@@ -48,15 +44,6 @@ for (const repository of repositories) {
if (!tags.includes('latest')) {
tags.push('latest')
}
try {
tags = semverSort.desc(tags)
} catch (error) { }
console.log({
name: repository.name,
image: repository.image,
tags
})
services.push({
name: repository.name,
image: repository.image,
+37 -36
View File
@@ -10,13 +10,11 @@ import { asyncExecShell, cleanupDockerStorage, createRemoteEngineConfiguration,
import { scheduler } from './lib/scheduler';
import { compareVersions } from 'compare-versions';
import Graceful from '@ladjs/graceful'
import axios from 'axios';
import yaml from 'js-yaml'
import fs from 'fs/promises';
import { verifyRemoteDockerEngineFn } from './routes/api/v1/destinations/handlers';
import { checkContainer } from './lib/docker';
import { migrateServicesToNewTemplate } from './lib';
import { getTemplates } from './lib/services';
import { refreshTags, refreshTemplates } from './routes/api/v1/handlers';
declare module 'fastify' {
interface FastifyInstance {
@@ -129,30 +127,10 @@ const host = '0.0.0.0';
try {
const { default: got } = await import('got')
try {
const tags = await got.get('https://get.coollabs.io/coolify/service-tags.json').text()
if (isDev) {
const templates = await fs.readFile('./devTemplates.yaml', 'utf8')
await fs.writeFile('./template.json', JSON.stringify(yaml.load(templates)))
const tags = await got.get('https://get.coollabs.io/coolify/service-tags.json').text()
await fs.writeFile('./tags.json', tags)
} else {
const response = await got.get('https://get.coollabs.io/coolify/service-templates.yaml').text()
await fs.writeFile('/app/template.json', JSON.stringify(yaml.load(response)))
await fs.writeFile('/app/tags.json', tags)
}
} catch (error) {
console.log("Couldn't get latest templates.")
console.log(error)
}
await migrateServicesToNewTemplate()
await fastify.listen({ port, host })
console.log(`Coolify's API is listening on ${host}:${port}`);
await migrateServicesToNewTemplate()
await initServer();
const graceful = new Graceful({ brees: [scheduler] });
@@ -192,11 +170,12 @@ const host = '0.0.0.0';
}, 10000)
await Promise.all([
getTagsTemplates(),
getArch(),
getIPAddress(),
configureRemoteDockers(),
])
} catch (error) {
console.error(error);
process.exit(1);
@@ -222,6 +201,27 @@ async function getIPAddress() {
} catch (error) { }
}
async function getTagsTemplates() {
const { default: got } = await import('got')
try {
const tags = await got.get('https://get.coollabs.io/coolify/service-tags.json').text()
if (isDev) {
const templates = await fs.readFile('./devTemplates.yaml', 'utf8')
await fs.writeFile('./templates.json', JSON.stringify(yaml.load(templates)))
await fs.writeFile('./tags.json', tags)
console.log('Tags and templates loaded in dev mode...')
} else {
const response = await got.get('https://get.coollabs.io/coolify/service-templates.yaml').text()
await fs.writeFile('/app/templates.json', JSON.stringify(yaml.load(response)))
await fs.writeFile('/app/tags.json', tags)
console.log('Tags and templates loaded...')
}
} catch (error) {
console.log("Couldn't get latest templates.")
console.log(error)
}
}
async function initServer() {
try {
console.log(`Initializing server...`);
@@ -234,6 +234,7 @@ async function initServer() {
}
} catch (error) { }
}
async function getArch() {
try {
const settings = await prisma.setting.findFirst({})
@@ -263,17 +264,15 @@ async function configureRemoteDockers() {
async function autoUpdater() {
try {
const { default: got } = await import('got')
const currentVersion = version;
const { data: versions } = await axios
.get(
`https://get.coollabs.io/versions.json`
, {
params: {
appId: process.env['COOLIFY_APP_ID'] || undefined,
version: currentVersion
}
})
const latestVersion = versions['coolify'].main.version;
const { coolify } = await got.get('https://get.coollabs.io/versions.json', {
searchParams: {
appId: process.env['COOLIFY_APP_ID'] || undefined,
version: currentVersion
}
}).json()
const latestVersion = coolify.main.version;
const isUpdateAvailable = compareVersions(latestVersion, currentVersion);
if (isUpdateAvailable === 1) {
const activeCount = 0
@@ -295,7 +294,9 @@ async function autoUpdater() {
}
}
}
} catch (error) { }
} catch (error) {
console.log(error)
}
}
async function checkFluentBit() {
+18 -3
View File
@@ -3,9 +3,9 @@ import fs from 'fs/promises';
export async function getTemplates() {
let templates: any = [];
if (isDev) {
templates = JSON.parse(await (await fs.readFile('./template.json')).toString())
templates = JSON.parse(await (await fs.readFile('./templates.json')).toString())
} else {
templates = JSON.parse(await (await fs.readFile('/app/template.json')).toString())
templates = JSON.parse(await (await fs.readFile('/app/templates.json')).toString())
}
// if (!isDev) {
// templates.push({
@@ -141,6 +141,19 @@ export async function getTemplates() {
// }
return templates
}
const compareSemanticVersions = (a: string, b: string) => {
const a1 = a.split('.');
const b1 = b.split('.');
const len = Math.min(a1.length, b1.length);
for (let i = 0; i < len; i++) {
const a2 = +a1[ i ] || 0;
const b2 = +b1[ i ] || 0;
if (a2 !== b2) {
return a2 > b2 ? 1 : -1;
}
}
return b1.length - a1.length;
};
export async function getTags(type?: string) {
let tags: any = [];
if (isDev) {
@@ -148,5 +161,7 @@ export async function getTags(type?: string) {
} else {
tags = JSON.parse(await (await fs.readFile('/app/tags.json')).toString())
}
return tags.find((tag: any) => tag.name.includes(type))
tags = tags.find((tag: any) => tag.name.includes(type))
tags.tags = tags.tags.sort(compareSemanticVersions).reverse();
return tags
}
@@ -1,16 +1,15 @@
import cuid from 'cuid';
import crypto from 'node:crypto'
import jsonwebtoken from 'jsonwebtoken';
import axios from 'axios';
import { FastifyReply } from 'fastify';
import fs from 'fs/promises';
import yaml from 'js-yaml';
import csv from 'csvtojson';
import { day } from '../../../../lib/dayjs';
import { makeLabelForStandaloneApplication, setDefaultBaseImage, setDefaultConfiguration } from '../../../../lib/buildPacks/common';
import { checkDomainsIsValidInDNS, checkDoubleBranch, checkExposedPort, createDirectories, decrypt, defaultComposeConfiguration, encrypt, errorHandler, executeDockerCmd, generateSshKeyPair, getContainerUsage, getDomain, isDev, isDomainConfigured, listSettings, prisma, stopBuild, uniqueName } from '../../../../lib/common';
import { checkContainer, formatLabelsOnDocker, isContainerExited, removeContainer } from '../../../../lib/docker';
import { setDefaultBaseImage, setDefaultConfiguration } from '../../../../lib/buildPacks/common';
import { checkDomainsIsValidInDNS, checkExposedPort, createDirectories, decrypt, defaultComposeConfiguration, encrypt, errorHandler, executeDockerCmd, generateSshKeyPair, getContainerUsage, getDomain, isDev, isDomainConfigured, listSettings, prisma, stopBuild, uniqueName } from '../../../../lib/common';
import { checkContainer, formatLabelsOnDocker, removeContainer } from '../../../../lib/docker';
import type { FastifyRequest } from 'fastify';
import type { GetImages, CancelDeployment, CheckDNS, CheckRepository, DeleteApplication, DeleteSecret, DeleteStorage, GetApplicationLogs, GetBuildIdLogs, SaveApplication, SaveApplicationSettings, SaveApplicationSource, SaveDeployKey, SaveDestination, SaveSecret, SaveStorage, DeployApplication, CheckDomain, StopPreviewApplication, RestartPreviewApplication, GetBuilds } from './types';
@@ -124,7 +123,7 @@ export async function getApplicationStatus(request: FastifyRequest<OnlyId>) {
for (const container of containersArray) {
let isRunning = false;
let isExited = false;
let isRestarting = false;
let isRestarting = false;
const containerObj = JSON.parse(container);
const status = containerObj.State
if (status === 'running') {
@@ -771,6 +770,7 @@ export async function saveApplicationSource(request: FastifyRequest<SaveApplicat
export async function getGitHubToken(request: FastifyRequest<OnlyId>, reply: FastifyReply) {
try {
const { default: got } = await import('got')
const { id } = request.params
const { teamId } = request.user
const application: any = await getApplicationFromDB(id, teamId);
@@ -782,13 +782,13 @@ export async function getGitHubToken(request: FastifyRequest<OnlyId>, reply: Fas
const githubToken = jsonwebtoken.sign(payload, application.gitSource.githubApp.privateKey, {
algorithm: 'RS256'
});
const { data } = await axios.post(`${application.gitSource.apiUrl}/app/installations/${application.gitSource.githubApp.installationId}/access_tokens`, {}, {
const { token } = await got.post(`${application.gitSource.apiUrl}/app/installations/${application.gitSource.githubApp.installationId}/access_tokens`, {
headers: {
Authorization: `Bearer ${githubToken}`
'Authorization': `Bearer ${githubToken}`,
}
})
}).json()
return reply.code(201).send({
token: data.token
token
})
} catch ({ status, message }) {
return errorHandler({ status, message })
+10 -7
View File
@@ -1,4 +1,3 @@
import axios from "axios";
import { compareVersions } from "compare-versions";
import cuid from "cuid";
import bcrypt from "bcryptjs";
@@ -66,10 +65,10 @@ export async function refreshTemplates() {
try {
if (isDev) {
const response = await fs.readFile('./devTemplates.yaml', 'utf8')
await fs.writeFile('./template.json', JSON.stringify(yaml.load(response)))
await fs.writeFile('./templates.json', JSON.stringify(yaml.load(response)))
} else {
const response = await got.get('https://get.coollabs.io/coolify/service-templates.yaml').text()
await fs.writeFile('/app/template.json', JSON.stringify(yaml.load(response)))
await fs.writeFile('/app/templates.json', JSON.stringify(yaml.load(response)))
}
} catch (error) {
console.log(error)
@@ -86,14 +85,18 @@ export async function refreshTemplates() {
}
export async function checkUpdate(request: FastifyRequest) {
try {
const { default: got } = await import('got')
const isStaging =
request.hostname === "staging.coolify.io" ||
request.hostname === "arm.coolify.io";
const currentVersion = version;
const { data: versions } = await axios.get(
`https://get.coollabs.io/versions.json?appId=${process.env["COOLIFY_APP_ID"]}&version=${currentVersion}`
);
const latestVersion = versions["coolify"].main.version;
const { coolify } = await got.get('https://get.coollabs.io/versions.json', {
searchParams: {
appId: process.env['COOLIFY_APP_ID'] || undefined,
version: currentVersion
}
}).json()
const latestVersion = coolify.main.version;
const isUpdateAvailable = compareVersions(latestVersion, currentVersion);
if (isStaging) {
return {
@@ -1,4 +1,3 @@
import axios from "axios";
import cuid from "cuid";
import crypto from "crypto";
import { encrypt, errorHandler, getDomain, getUIUrl, isDev, prisma } from "../../../lib/common";
@@ -32,13 +31,14 @@ export async function installGithub(request: FastifyRequest<InstallGithub>, repl
}
export async function configureGitHubApp(request, reply) {
try {
const { default: got } = await import('got')
const { code, state } = request.query;
const { apiUrl } = await prisma.gitSource.findFirst({
where: { id: state },
include: { githubApp: true, gitlabApp: true }
});
const { data }: any = await axios.post(`${apiUrl}/app-manifests/${code}/conversions`);
const data: any = await got.post(`${apiUrl}/app-manifests/${code}/conversions`).json()
const { id, client_id, slug, client_secret, pem, webhook_secret } = data
const encryptedClientSecret = encrypt(client_secret);
+14 -12
View File
@@ -1,4 +1,3 @@
import axios from "axios";
import cuid from "cuid";
import crypto from "crypto";
import type { FastifyReply, FastifyRequest } from "fastify";
@@ -10,6 +9,7 @@ import type { ConfigureGitLabApp, GitLabEvents } from "./types";
export async function configureGitLabApp(request: FastifyRequest<ConfigureGitLabApp>, reply: FastifyReply) {
try {
const { default: got } = await import('got')
const { code, state } = request.query;
const { fqdn } = await listSettings();
const { gitSource: { gitlabApp: { appId, appSecret }, htmlUrl } }: any = await getApplicationFromDB(state, undefined);
@@ -19,19 +19,21 @@ export async function configureGitLabApp(request: FastifyRequest<ConfigureGitLab
if (isDev) {
domain = getAPIUrl();
}
const params = new URLSearchParams({
client_id: appId,
client_secret: appSecret,
code,
state,
grant_type: 'authorization_code',
redirect_uri: `${domain}/webhooks/gitlab`
});
const { data } = await axios.post(`${htmlUrl}/oauth/token`, params)
const { access_token } = await got.post(`${htmlUrl}/oauth/token`, {
searchParams: {
client_id: appId,
client_secret: appSecret,
code,
state,
grant_type: 'authorization_code',
redirect_uri: `${domain}/webhooks/gitlab`
}
}).json()
if (isDev) {
return reply.redirect(`${getUIUrl()}/webhooks/success?token=${data.access_token}`)
return reply.redirect(`${getUIUrl()}/webhooks/success?token=${access_token}`)
}
return reply.redirect(`/webhooks/success?token=${data.access_token}`)
return reply.redirect(`/webhooks/success?token=${access_token}`)
} catch ({ status, message, ...other }) {
return errorHandler({ status, message })
}
+1
View File
@@ -0,0 +1 @@
[{"name":"appwrite","image":"appwrite/appwrite","tags":["1.0.3","1.0.1","1.0.0","0.9.3","0.9.1","0.8.0","0.7.1","0.6.2","0.6.0","0.5.2","0.5.0","0.3.1","0.2.0","0.15.2","0.15.0","0.14.2","0.14.0","0.13.4","0.13.2","0.13.0","0.12.3","0.12.1","0.12.0","0.11.2","0.11.0","0.10.4","0.10.2","0.10.0","0.1.8","0.1.6","latest"]},{"name":"weblate","image":"weblate/weblate","tags":["latest","edge-2022-10-26-c69cfdd83ed1fad4a4d57398552b8c70894a6586","edge-2022-10-26-410b3aff37de5bbfacbc47642ce28b2518bee506","edge-2022-10-25-e09e2c29ed3748eb0fa248453635dd27768e8dd9","edge-2022-10-25-a059748c178cce0bc30bdc915d4ff8f0d13ce25c","edge-2022-10-24-94ae069cdcf9a171e812da32d760a436fa9b37ad","edge-2022-10-24-71d2011a1f6d2b60bb65af9f775bf75d4beaf8fd","edge-2022-10-19-acb8e82a0ea2c86fb7ce8f5cb1a81e2bc634583a","edge-2022-10-18-f54b83a0898bef9d14b00d885f675c2e4ebb68ca","edge-2022-10-17-eb9dc248720581052b4be4e3f1f372bce37edd62","edge-2022-10-17-e5a5f6cfdf7e500b7b357566971172fad022c1dc","edge-2022-10-17-da6d01ea005c29453e0111a45956d16bf2262f54","edge-2022-10-17-7a28d7f727778dd05b163fa40ec7903e2e07b20c","edge-2022-10-13-899ea7d8aef900ef216e231433fe15e8dc9a2af8","edge-2022-10-13-385a55156bdc918b0e78ce337322b8996455027a","edge-2022-10-12-5356be32da4b8beb16ba3ec0aa8763f6e08294ab","edge-2022-10-10-d087b31ef728a3a9c3563de9aa4b2ea189755fdf","edge-2022-10-07-f6d43c61fee0e58eb18dd6f80404fba272280c3f","edge-2022-10-05-b86e34a866f40446dc8cb1b48f5d56e621904a0c","edge-2022-10-05-82096af0a688d0104c1c5b973dfc1c6eef6f9d85","edge-2022-10-05-495225a1fd551be41301b53dcd5b10d0c97927bb","edge-2022-10-05-0bb3091700132894e51d806a140145a03489fc09","edge-2022-10-03-9255921fca690c5350ba16960d856c68b910e586","edge-2022-10-03-4b9d377a8289ede1a16b05836eeed0c3b0570dd9","edge-2022-10-01-482ba9c3f7862bca8b1e70d3d0a02806e075d120","edge-2022-09-28-934021ad5497df1c945e42187aaa7d71f6d8d91c","edge-2022-09-26-906b41dd035a8b3949f0afb2bb4d031b88a7b2bb","edge-2022-09-26-8b182a8450dc0541c474c76bf05c7deea16d4345","edge-2022-09-22-dd4d880d619cdca5f8163a1e396136674fe96383","edge-2022-09-19-d7dea01afaf51c9206c0d3d30dc19c31ef5be7df"]},{"name":"searxng","image":"searxng/searxng","tags":["latest-build-cache","latest","2022.10.25-affd8f75","2022.10.25-4783d6c9","2022.10.21-710a3a00","2022.10.14-e2dd5a80","2022.10.14-72f6367e","2022.10.14-4d4dfc58","2022.10.14-2eb81701","2022.10.14-1a5b0965","2022.10.14-096d9def","2022.10.11-a7337612","2022.10.07-84f61af8","2022.10.07-666cd1f6","2022.10.01-e9af772b","2022.10.01-901143f0","2022.10.01-14d0fb2c","2022.09.30-f4281b16","2022.09.30-62324655","2022.09.29-f3d25f9c","2022.09.29-a7d69323","2022.09.29-5f340154","2022.09.29-520a873a","2022.09.29-50607324","2022.09.28-a3148e51","2022.09.28-7097508a","2022.09.28-0e00af9c","2022.09.24-ddd380fc","2022.09.24-c808284f","2022.09.24-bfd6f618"]},{"name":"glitchtip","image":"glitchtip/glitchtip","tags":["v2.0.7","v2.0.5","v2.0.2","v2.0.0","v1.9.2","v1.9.0","v1.8.4","v1.8.2","v1.8.0","v1.7.1","v1.6.4","v1.6.2","v1.6.0","v1.5.3","v1.5.1","v1.4.1","v1.3.3","v1.3.1","v1.2.6","v1.2.4","v1.2.2","v1.2.0","v1.12.4","v1.12.2","v1.12.0","v1.10.3","v1.10.1","v1.1.2","v1.1.0","v1.0.8","latest"]},{"name":"hasura","image":"hasura/graphql-engine","tags":["v2.9.0","v2.8.4","v2.8.3","v2.8.2","v2.8.1","v2.8.0","v2.7.0","v2.6.2","v2.6.1","v2.6.0","v2.5.2","v2.5.1","v2.5.0","v2.4.0","v2.3.1","v2.3.0","v2.2.2","v2.2.1","v2.2.0","v2.13.0","v2.12.0","v2.11.2","v2.11.1","v2.11.0","v2.10.1","v2.10.0","v2.1.1","v2.1.0","v2.0.9","v2.0.8","latest"]},{"name":"umami","image":"ghcr.io/umami-software/umami","tags":["postgresql-v1.39.2","postgresql-v1.39.1","postgresql-v1.39.0","postgresql-v1.38.0","postgresql-v1.37.0","postgresql-v1.36.1","postgresql-v1.36.0","postgresql-v1.35.0","postgresql-v1.34.0","postgresql-v1.33.3","postgresql-latest","mysql-v1.39.2","mysql-v1.39.1","mysql-v1.39.0","mysql-v1.38.0","mysql-v1.37.0","mysql-v1.36.1","mysql-v1.36.0","mysql-v1.35.0","mysql-v1.34.0","mysql-v1.33.3","mysql-latest","latest"]},{"name":"meilisearch","image":"getmeili/meilisearch","tags":["v0.9.0","v0.8.3","v0.8.1","v0.29.1","v0.29.0","v0.28.1","v0.28.0","v0.27.1","v0.27.0","v0.26.1","v0.26.0","v0.25.1","v0.25.0","v0.23.1","v0.23.0","v0.21.1","v0.21.0","v0.20.0","v0.19.0","v0.18.1","v0.18.0","v0.17.0","v0.16.0","v0.14.1","v0.14.0","v0.12.0","v0.11.0","v0.10.0","0.14.1","latest"]},{"name":"ghost","image":"bitnami/ghost","tags":["5.7.1","5.7.0","5.5.0","5.4.1","5.4.0","5.3.1","5.3.0","5.20.0","5.2.4","5.2.3","5.2.2","5.2.1","5.19.3","5.19.2","5.19.1","5.19.0","5.18.0","5.17.2","5.17.1","5.17.0","5.16.2","5.16.1","5.16.0","5.15.0","5.14.2","5.14.1","5.14.0","5.13.2","5.13.1","5.13.0","latest"]},{"name":"wordpress","image":"library/wordpress","tags":["6.0.3","6.0.2","6.0.1","6.0.0","5.9.3","5.9.2","5.9.1","5.9.0","5.8.3","5.8.2","5.8.1","5.8.0","5.7.2","5.7.1","5.7.0","5.6.2","5.6.1","5.6.0","5.5.3","5.5.1","5.5.0","5.4.2","5.4.1","5.4.0","5.3.2","5.3.1","5.3.0","5.2.4","5.2.3","5.2.2","latest"]},{"name":"vscodeserver","image":"codercom/code-serverLine truncated
+1
View File
@@ -0,0 +1 @@
[{"templateVersion":"1.0.0","defaultVersion":"1.0.3","name":"Appwrite","documentation":"https://appwrite.io/docs","description":"Secure Backend Server for Web, Mobile & Flutter Developers.","services":{"$$id":{"image":"appwrite/appwrite:$$core_version","environment":["_APP_ENV=$$config__app_env","_APP_WORKER_PER_CORE=$$config__app_worker_per_core","_APP_LOCALE=$$config__app_locale","_APP_CONSOLE_WHITELIST_ROOT=$$config__app_console_whitelist_root","_APP_CONSOLE_WHITELIST_EMAILS=$$config__app_console_whitelist_emails","_APP_CONSOLE_WHITELIST_IPS=$$config__app_console_whitelist_ips","_APP_SYSTEM_EMAIL_NAME=$$config__app_system_email_name","_APP_SYSTEM_EMAIL_ADDRESS=$$config__app_system_email_address","_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=$$config__app_system_security_email_address","_APP_SYSTEM_RESPONSE_FORMAT=$$config__app_system_response_format","_APP_OPTIONS_ABUSE=$$config__app_options_abuse","_APP_OPTIONS_FORCE_HTTPS=$$config__app_options_force_https","_APP_OPENSSL_KEY_V1=$$secret__app_openssl_key_v1","_APP_DOMAIN=$$generate_fqdn","_APP_DOMAIN_TARGET=$$generate_fqdn","_APP_REDIS_HOST=$$config__app_redis_host","_APP_REDIS_PORT=$$config__app_redis_port","_APP_REDIS_USER=$$config__app_redis_user","_APP_REDIS_PASS=$$secret__app_redis_pass","_APP_DB_HOST=$$config__app_db_host","_APP_DB_PORT=$$config__app_db_port","_APP_DB_SCHEMA=$$config__app_db_schema","_APP_DB_USER=$$config__app_db_user","_APP_DB_PASS=$$secret__app_db_pass","_APP_SMTP_HOST=$$config__app_smtp_host","_APP_SMTP_PORT=$$config__app_smtp_port","_APP_SMTP_SECURE=$$config__app_smtp_secure","_APP_SMTP_USERNAME=$$config__app_smtp_username","_APP_SMTP_PASSWORD=$$secret__app_smtp_password","_APP_USAGE_STATS=$$config__app_usage_stats","_APP_INFLUXDB_HOST=$$config__app_influxdb_host","_APP_INFLUXDB_PORT=$$config__app_influxdb_port","_APP_STORAGE_LIMIT=$$config__app_storage_limit","_APP_STORAGE_PREVIEW_LIMIT=$$config__app_storage_preview_limit","_APP_STORAGE_ANTIVIRUS=$$config__app_storage_antivirus_enabled","_APP_STORAGE_ANTIVIRUS_HOST=$$config__app_storage_antivirus_host","_APP_STORAGE_ANTIVIRUS_PORT=$$config__app_storage_antivirus_port","_APP_STORAGE_DEVICE=$$config__app_storage_device","_APP_STORAGE_S3_ACCESS_KEY=$$secret__app_storage_s3_access_key","_APP_STORAGE_S3_SECRET=$$secret__app_storage_s3_secret","_APP_STORAGE_S3_REGION=$$config__app_storage_s3_region","_APP_STORAGE_S3_BUCKET=$$config__app_storage_s3_bucket","_APP_STORAGE_DO_SPACES_ACCESS_KEY=$$secret__app_storage_do_spaces_access_key","_APP_STORAGE_DO_SPACES_SECRET=$$secret__app_storage_do_spaces_secret","_APP_STORAGE_DO_SPACES_REGION=$$config__app_storage_do_spaces_region","_APP_STORAGE_DO_SPACES_BUCKET=$$config__app_storage_do_spaces_bucket","_APP_STORAGE_BACKBLAZE_ACCESS_KEY=$$secret__app_storage_backblaze_access_key","_APP_STORAGE_BACKBLAZE_SECRET=$$secret__app_storage_backblaze_secret","_APP_STORAGE_BACKBLAZE_REGION=$$config__app_storage_backblaze_region","_APP_STORAGE_BACKBLAZE_BUCKET=$$config__app_storage_backblaze_bucket","_APP_STORAGE_LINODE_ACCESS_KEY=$$secret__app_storage_linode_access_key","_APP_STORAGE_LINODE_SECRET=$$secret__app_storage_linode_secret","_APP_STORAGE_LINODE_REGION=$$config__app_storage_linode_region","_APP_STORAGE_LINODE_BUCKET=$$config__app_storage_linode_bucket","_APP_STORAGE_WASABI_ACCESS_KEY=$$secret__app_storage_wasabi_access_key","_APP_STORAGE_WASABI_SECRET=$$secret__app_storage_wasabi_secret","_APP_STORAGE_WASABI_REGION=$$config__app_storage_wasabi_region","_APP_STORAGE_WASABI_BUCKET=$$config__app_storage_wasabi_bucket","_APP_FUNCTIONS_SIZE_LIMIT=$$config__app_functions_size_limit","_APP_FUNCTIONS_TIMEOUT=$$config__app_functions_timeout","_APP_FUNCTIONS_BUILD_TIMEOUT=$$config__app_functions_build_timeout","_APP_FUNCTIONS_CONTAINERS=$$config__app_functions_containers","_APP_FUNCTIONS_CPUS=$$config__app_functions_cpus","_APP_FUNCTIONS_MEMORY=$$config__app_functions_memory_allocated","_APP_FUNCTIONS_MEMORY_SWAP=$$config__app_functions_memory_swap","_APP_FUNCTIONS_RUNTIMES=$$config__app_functions_runtimes","_APP_EXECUTOR_SECRET=$$secret__app_executor_secret","_APP_EXECUTOR_HOST=$$config__app_executor_host","_APP_LOGGING_PROVIDER=$$config__app_logging_provider","_APP_LOGGING_CONFIG=$$config__app_logging_config","_APP_STATSD_HOST=$$config__app_statsd_host","_APP_STATSD_PORT=$$config__app_statsd_port","_APP_MAINTENANCE_INTERVAL=$$config__app_maintenance_interval","_APP_MAINTENANCE_RETENTION_EXECUTION=$$config__app_maintenance_retention_execution","_APP_MAINTENANCE_RETENTION_CACHE=$$config__app_maintenance_retention_cache","_APP_MAINTENANCE_RETENTION_ABUSE=$$config__app_maintenance_retention_abuse","_APP_MAINTENANCE_RETENTION_AUDIT=$$config__app_maintenance_retention_audit","_APP_SMS_PROVIDER=$$config__app_sms_provider","_APP_SMS_FROM=$$config__app_sms_from","OPEN_RUNTIMES_NETWORK=$$config_open_runtimes_network"],"volumes":["$$id-uploads:/storage/uploads","$$id-cache:/storage/cache","$$id-config:/storage/config","$$id-certificates:/storage/certificates","$$id-functiLine truncated
@@ -91,6 +91,7 @@
<div class="absolute top-0 right-0 flex justify-center items-center h-full cursor-pointer text-stone-600 hover:text-white mr-3">
<div class="flex space-x-2">
{#if isPasswordField}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div on:click={() => (showPassword = !showPassword)}>
{#if showPassword}
<svg
@@ -132,6 +133,7 @@
</div>
{/if}
{#if value && isHttps}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div on:click={copyToClipboard}>
<svg
xmlns="http://www.w3.org/2000/svg"
+1 -1
View File
@@ -16,7 +16,7 @@
<a
{id}
href={url}
target="_blank"
target="_blank noreferrer"
class="flex no-underline inline-block cursor-pointer"
class:icons={!text}
>
+19 -25
View File
@@ -3,7 +3,7 @@
// import Tooltip from './Tooltip.svelte';
export let explanation = '';
export let position = 'dropdown-right'
export let position = 'dropdown-right';
// let id: any;
// let self: any;
// onMount(() => {
@@ -13,32 +13,26 @@
<div class={`dropdown dropdown-end ${position}`}>
<!-- svelte-ignore a11y-label-has-associated-control -->
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<label tabindex="0" class="btn btn-circle btn-ghost btn-xs text-sky-500">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="w-4 h-4 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="w-4 h-4 stroke-current"
><path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/></svg
>
</label>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<div tabindex="0" class="card compact dropdown-content shadow bg-coolgray-400 rounded w-64">
<div class="card-body">
<!-- <h2 class="card-title">You needed more info?</h2> -->
<p class="text-xs font-normal">{@html explanation}</p>
</div>
<div class="card-body">
<!-- <h2 class="card-title">You needed more info?</h2> -->
<p class="text-xs font-normal">{@html explanation}</p>
</div>
</div>
</div>
<!-- <div {id} class="inline-block mx-2 cursor-pointer" bind:this={self}>
<svg
fill="none"
height="14"
shape-rendering="geometricPrecision"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.4"
viewBox="0 0 24 24"
width="14"
><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z" /><path
d="M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"
/><circle cx="12" cy="17" r=".5" />
</svg>
</div>
{#if id}
<Tooltip triggeredBy={`#${id}`}>{@html explanation}</Tooltip>
{/if} -->
@@ -31,6 +31,7 @@
</div>
</div>
<div class:text-center={isCenter} class={`flex justify-center ${customClass}`}>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
on:click
aria-pressed="false"
+1
View File
@@ -9,6 +9,7 @@
}
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
on:click={() => dispatch('click')}
on:mouseover={() => dispatch('pause')}
+5 -3
View File
@@ -257,6 +257,7 @@
</svg>
</a>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
id="logout"
class="icons bg-coolgray-200 hover:text-error cursor-pointer"
@@ -285,7 +286,7 @@
<a
class="text-[10px] no-underline"
href={`https://github.com/coollabsio/coolify/releases/tag/v${$appSession.version}`}
target="_blank">v{$appSession.version}</a
target="_blank noreferrer">v{$appSession.version}</a
>
</div>
</div>
@@ -293,7 +294,7 @@
</nav>
{#if $appSession.whiteLabeled}
<span class="fixed bottom-0 left-[50px] z-50 m-2 px-4 text-xs text-stone-700"
>Powered by <a href="https://coolify.io" target="_blank">Coolify</a></span
>Powered by <a href="https://coolify.io" target="_blank noreferrer">Coolify</a></span
>
{/if}
{/if}
@@ -434,6 +435,7 @@
<UpdateAvailable />
</div>
<li>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div class="no-underline icons hover:bg-error" on:click={logout}>
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -458,7 +460,7 @@
<a
class="text-xs hover:bg-coolgray-200 no-underline hover:text-white text-right"
href={`https://github.com/coollabsio/coolify/releases/tag/v${$appSession.version}`}
target="_blank">v{$appSession.version}</a
target="_blank noreferrer">v{$appSession.version}</a
>
</li>
</ul>
+8 -44
View File
@@ -29,7 +29,6 @@ importers:
'@types/node-os-utils': 1.3.0
'@typescript-eslint/eslint-plugin': 5.41.0
'@typescript-eslint/parser': 5.41.0
axios: 0.27.2
bcryptjs: 2.4.3
bree: 9.1.2
cabin: 9.1.2
@@ -63,7 +62,6 @@ importers:
public-ip: 6.0.1
pump: ^3.0.0
rimraf: 3.0.2
semver-sort: 1.0.0
ssh-config: 4.1.6
strip-ansi: 7.0.1
tsconfig-paths: 4.1.0
@@ -81,7 +79,6 @@ importers:
'@iarna/toml': 2.2.5
'@ladjs/graceful': 3.0.2
'@prisma/client': 4.5.0_prisma@4.5.0
axios: 0.27.2
bcryptjs: 2.4.3
bree: 9.1.2
cabin: 9.1.2
@@ -123,7 +120,6 @@ importers:
nodemon: 2.0.20
prettier: 2.7.1
rimraf: 3.0.2
semver-sort: 1.0.0
tsconfig-paths: 4.1.0
typescript: 4.8.4
@@ -732,7 +728,7 @@ packages:
eslint: 8.26.0
ignore: 5.2.0
regexpp: 3.2.0
semver: 7.3.7
semver: 7.3.8
tsutils: 3.21.0_typescript@4.8.4
typescript: 4.8.4
transitivePeerDependencies:
@@ -806,7 +802,7 @@ packages:
debug: 4.3.4
globby: 11.1.0
is-glob: 4.0.3
semver: 7.3.7
semver: 7.3.8
tsutils: 3.21.0_typescript@4.8.4
typescript: 4.8.4
transitivePeerDependencies:
@@ -827,7 +823,7 @@ packages:
eslint: 8.26.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0_eslint@8.26.0
semver: 7.3.7
semver: 7.3.8
transitivePeerDependencies:
- supports-color
- typescript
@@ -1079,15 +1075,6 @@ packages:
- supports-color
dev: false
/axios/0.27.2:
resolution: {integrity: sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==}
dependencies:
follow-redirects: 1.15.0
form-data: 4.0.0
transitivePeerDependencies:
- debug
dev: false
/babel-code-frame/6.26.0:
resolution: {integrity: sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==}
dependencies:
@@ -3127,7 +3114,7 @@ packages:
proxy-addr: 2.0.7
rfdc: 1.3.0
secure-json-parse: 2.5.0
semver: 7.3.7
semver: 7.3.8
tiny-lru: 9.0.2
transitivePeerDependencies:
- supports-color
@@ -3243,16 +3230,6 @@ packages:
mini-svg-data-uri: 1.4.4
dev: true
/follow-redirects/1.15.0:
resolution: {integrity: sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==}
engines: {node: '>=4.0'}
peerDependencies:
debug: '*'
peerDependenciesMeta:
debug:
optional: true
dev: false
/form-data-encoder/2.0.1:
resolution: {integrity: sha512-Oy+P9w5mnO4TWXVgUiQvggNKPI9/ummcSt5usuIV6HkaLKigwzPpoenhEqmGmx3zHqm6ZLJ+CR/99N8JLinaEw==}
engines: {node: '>= 14.17'}
@@ -4707,7 +4684,7 @@ packages:
last-commit-log: 3.1.2
lodash: 4.17.21
read-pkg-up: 7.0.1
semver: 7.3.7
semver: 7.3.8
dev: false
/parse-err/0.0.12:
@@ -5321,19 +5298,6 @@ packages:
resolution: {integrity: sha512-ZQruFgZnIWH+WyO9t5rWt4ZEGqCKPwhiw+YbzTwpmT9elgLrLcfuyUiSnwwjUiVy9r4VM3urtbNF1xmEh9IL2w==}
dev: false
/semver-regex/3.1.4:
resolution: {integrity: sha512-6IiqeZNgq01qGf0TId0t3NvKzSvUsjcpdEO3AQNeIjR6A2+ckTnQlDpl4qu1bjRv0RzN3FP9hzFmws3lKqRWkA==}
engines: {node: '>=8'}
dev: true
/semver-sort/1.0.0:
resolution: {integrity: sha512-JicVlQKz/C//4BiPmbHEDou6HihXxo5xqB/8Hm9FaLJ6HHkRRvYgCECq4u/z0XF8kyJQ/KAZt++A/kYz/oOSSg==}
engines: {node: '>=0.10.0'}
dependencies:
semver: 5.7.1
semver-regex: 3.1.4
dev: true
/semver/5.7.1:
resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==}
hasBin: true
@@ -5343,8 +5307,8 @@ packages:
hasBin: true
dev: true
/semver/7.3.7:
resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==}
/semver/7.3.8:
resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==}
engines: {node: '>=10'}
hasBin: true
dependencies:
@@ -5659,7 +5623,7 @@ packages:
mime: 2.6.0
qs: 6.10.3
readable-stream: 3.6.0
semver: 7.3.7
semver: 7.3.8
transitivePeerDependencies:
- supports-color
dev: false