Compare commits

...

16 Commits

Author SHA1 Message Date
Andras Bacsai
ce9aa636c4 Merge pull request #537 from coollabsio/next
v3.3.4
2022-08-15 11:20:54 +02:00
Andras Bacsai
68d06dcd19 chore: version++ 2022-08-15 09:17:48 +00:00
Andras Bacsai
03bf93eb12 fix: loading indicator 2022-08-15 09:17:31 +00:00
Andras Bacsai
163eabb76c fix: make it public button 2022-08-15 09:15:42 +00:00
Andras Bacsai
bed1bb2429 Merge pull request #536 from coollabsio/next
v3.3.3
2022-08-14 22:04:28 +02:00
Andras Bacsai
bc802b6f19 fix: postgresql on ARM 2022-08-14 20:02:18 +00:00
Andras Bacsai
9b67a253f1 fix: decryption errors 2022-08-12 19:39:03 +00:00
Andras Bacsai
29dc5a8bb4 revert debug 2022-08-12 19:29:53 +00:00
Andras Bacsai
b63e516274 debug 2022-08-12 19:21:45 +00:00
Andras Bacsai
db9d5a0fb0 Merge branch 'next' of https://github.com/coollabsio/coolify into next 2022-08-12 19:07:45 +00:00
Andras Bacsai
3f5e6faac5 Merge branch 'main' of https://github.com/coollabsio/coolify into next 2022-08-12 19:07:42 +00:00
Andras Bacsai
eef6b95e24 debug more 2022-08-12 19:06:46 +00:00
Andras Bacsai
96b76aea6b debug: fider 2022-08-12 19:00:39 +00:00
Andras Bacsai
0745a12e7d Merge pull request #534 from coollabsio/next
v3.3.2
2022-08-12 18:32:12 +02:00
Andras Bacsai
645d5e19db ui fixes on dashboard 2022-08-12 16:19:56 +00:00
Andras Bacsai
45e2c7bd03 fix: debounce dashboard status requests 2022-08-12 16:14:37 +00:00
7 changed files with 50 additions and 28 deletions

View File

@@ -17,7 +17,7 @@ import { checkContainer, removeContainer } from './docker';
import { day } from './dayjs';
import * as serviceFields from './serviceFields'
export const version = '3.3.1';
export const version = '3.3.4';
export const isDev = process.env.NODE_ENV === 'development';
const algorithm = 'aes-256-ctr';
@@ -96,17 +96,23 @@ export const base64Decode = (text: string): string => {
};
export const decrypt = (hashString: string) => {
if (hashString) {
const hash = JSON.parse(hashString);
const decipher = crypto.createDecipheriv(
algorithm,
process.env['COOLIFY_SECRET_KEY'],
Buffer.from(hash.iv, 'hex')
);
const decrpyted = Buffer.concat([
decipher.update(Buffer.from(hash.content, 'hex')),
decipher.final()
]);
return decrpyted.toString();
try {
const hash = JSON.parse(hashString);
const decipher = crypto.createDecipheriv(
algorithm,
process.env['COOLIFY_SECRET_KEY'],
Buffer.from(hash.iv, 'hex')
);
const decrpyted = Buffer.concat([
decipher.update(Buffer.from(hash.content, 'hex')),
decipher.final()
]);
return decrpyted.toString();
} catch (error) {
console.log({ decryptionError: error.message })
return hashString
}
}
};
export const encrypt = (text: string) => {
@@ -867,6 +873,11 @@ export function generateDatabaseConfiguration(database: any, arch: string):
}
if (isARM(arch)) {
configuration.volume = `${id}-${type}-data:/var/lib/postgresql`;
configuration.environmentVariables = {
POSTGRES_PASSWORD: dbUserPassword,
POSTGRES_USER: dbUser,
POSTGRES_DB: defaultDatabase
}
}
return configuration
} else if (type === 'redis') {
@@ -903,7 +914,7 @@ export function generateDatabaseConfiguration(database: any, arch: string):
return configuration
}
}
export function isARM(arch) {
export function isARM(arch: string) {
if (arch === 'arm' || arch === 'arm64') {
return true
}
@@ -1226,7 +1237,6 @@ export async function startTraefikTCPProxy(
}
traefikUrl = `${ip}/webhooks/traefik/other.json`
}
console.log(traefikUrl)
const tcpProxy = {
version: '3.8',
services: {
@@ -1291,6 +1301,7 @@ export async function getServiceFromDB({ id, teamId }: { id: string; teamId: str
return s;
});
}
body[type] = { ...body[type], ...getUpdateableFields(type, body[type]) }
return { ...body, settings };
}

View File

@@ -326,7 +326,7 @@ export const fider = [{
isBoolean: false,
isEncrypted: true
}, {
name: 'postgreslUser',
name: 'postgresqlUser',
isEditable: false,
isLowerCase: false,
isNumber: false,

View File

@@ -197,13 +197,11 @@ export async function getService(request: FastifyRequest<OnlyId>) {
const teamId = request.user.teamId;
const { id } = request.params;
const service = await getServiceFromDB({ id, teamId });
const settings = await listSettings()
if (!service) {
throw { status: 404, message: 'Service not found.' }
}
return {
service,
settings
service
}
} catch ({ status, message }) {
return errorHandler({ status, message })

View File

@@ -59,7 +59,7 @@
async function changeSettings(name: any) {
if (name !== 'appendOnly') {
if (publicLoading || !$status.database.isRunning || name !== 'appendOnly') return;
if (publicLoading || !$status.database.isRunning) return;
}
publicLoading = true;
let data = {
@@ -247,6 +247,7 @@
{#if database.type === 'redis'}
<div class="grid grid-cols-2 items-center">
<Setting
loading={publicLoading}
bind:setting={appendOnly}
on:click={() => changeSettings('appendOnly')}
title={$t('database.change_append_only_mode')}

View File

@@ -23,9 +23,9 @@
import { get, post } from '$lib/api';
import Usage from '$lib/components/Usage.svelte';
import { t } from '$lib/translations';
import { errorNotification } from '$lib/common';
import { errorNotification, asyncSleep } from '$lib/common';
import { addToast, appSession } from '$lib/store';
import ApplicationsIcons from '$lib/components/svg/applications/ApplicationIcons.svelte';
import DatabaseIcons from '$lib/components/svg/databases/DatabaseIcons.svelte';
import ServiceIcons from '$lib/components/svg/services/ServiceIcons.svelte';
@@ -37,8 +37,18 @@
export let applications: any;
export let databases: any;
export let services: any;
let numberOfGetStatus = 0;
function getRndInteger(min, max) {
return Math.floor(Math.random() * (max - min + 1) ) + min;
}
async function getStatus(resources: any) {
while (numberOfGetStatus > 1){
await asyncSleep(getRndInteger(100,200));
}
try {
numberOfGetStatus++;
const { id, buildPack, dualCerts } = resources;
let isRunning = false;
if (buildPack) {
@@ -58,7 +68,9 @@
}
} catch (error) {
return 'Error';
}
} finally {
numberOfGetStatus--;
}
}
async function manuallyCleanupStorage() {
try {
@@ -82,7 +94,6 @@
>Cleanup Storage</button
>
</div>
<div class="mt-10 pb-12 tracking-tight sm:pb-16">
<div class="mx-auto px-10">
<div class="flex flex-col justify-center xl:flex-row">
@@ -113,7 +124,7 @@
Application
</div></td
>
<td>
<td class="flex justify-end">
{#if application.fqdn}
<a
href={application.fqdn}
@@ -189,7 +200,7 @@
</div>
</td>
<td>
<td class="flex justify-end">
{#if service.fqdn}
<a
href={service.fqdn}
@@ -263,7 +274,7 @@
Database
</div>
</td>
<td>
<td class="flex justify-end">
<a
href={`/databases/${database.id}`}
class="icons bg-transparent text-sm inline-flex ml-11"

View File

@@ -1,9 +1,10 @@
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "git";
name = "environment";
buildInputs = [
git
git-lfs
docker-compose
];
}

View File

@@ -1,7 +1,7 @@
{
"name": "coolify",
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
"version": "3.3.1",
"version": "3.3.4",
"license": "Apache-2.0",
"repository": "github:coollabsio/coolify",
"scripts": {