mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-18 12:33:06 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce9aa636c4 | ||
|
|
68d06dcd19 | ||
|
|
03bf93eb12 | ||
|
|
163eabb76c | ||
|
|
bed1bb2429 | ||
|
|
bc802b6f19 | ||
|
|
9b67a253f1 | ||
|
|
29dc5a8bb4 | ||
|
|
b63e516274 | ||
|
|
db9d5a0fb0 | ||
|
|
3f5e6faac5 | ||
|
|
eef6b95e24 | ||
|
|
96b76aea6b | ||
|
|
0745a12e7d | ||
|
|
645d5e19db | ||
|
|
45e2c7bd03 |
@@ -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 };
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ export const fider = [{
|
||||
isBoolean: false,
|
||||
isEncrypted: true
|
||||
}, {
|
||||
name: 'postgreslUser',
|
||||
name: 'postgresqlUser',
|
||||
isEditable: false,
|
||||
isLowerCase: false,
|
||||
isNumber: false,
|
||||
|
||||
@@ -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 })
|
||||
|
||||
@@ -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')}
|
||||
|
||||
@@ -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"
|
||||
|
||||
3
csb.nix
3
csb.nix
@@ -1,9 +1,10 @@
|
||||
with import <nixpkgs> {};
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "git";
|
||||
name = "environment";
|
||||
buildInputs = [
|
||||
git
|
||||
git-lfs
|
||||
docker-compose
|
||||
];
|
||||
}
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user