mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-25 20:49:28 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 { day } from './dayjs';
|
||||||
import * as serviceFields from './serviceFields'
|
import * as serviceFields from './serviceFields'
|
||||||
|
|
||||||
export const version = '3.3.1';
|
export const version = '3.3.3';
|
||||||
export const isDev = process.env.NODE_ENV === 'development';
|
export const isDev = process.env.NODE_ENV === 'development';
|
||||||
|
|
||||||
const algorithm = 'aes-256-ctr';
|
const algorithm = 'aes-256-ctr';
|
||||||
@@ -96,17 +96,23 @@ export const base64Decode = (text: string): string => {
|
|||||||
};
|
};
|
||||||
export const decrypt = (hashString: string) => {
|
export const decrypt = (hashString: string) => {
|
||||||
if (hashString) {
|
if (hashString) {
|
||||||
const hash = JSON.parse(hashString);
|
try {
|
||||||
const decipher = crypto.createDecipheriv(
|
const hash = JSON.parse(hashString);
|
||||||
algorithm,
|
const decipher = crypto.createDecipheriv(
|
||||||
process.env['COOLIFY_SECRET_KEY'],
|
algorithm,
|
||||||
Buffer.from(hash.iv, 'hex')
|
process.env['COOLIFY_SECRET_KEY'],
|
||||||
);
|
Buffer.from(hash.iv, 'hex')
|
||||||
const decrpyted = Buffer.concat([
|
);
|
||||||
decipher.update(Buffer.from(hash.content, 'hex')),
|
const decrpyted = Buffer.concat([
|
||||||
decipher.final()
|
decipher.update(Buffer.from(hash.content, 'hex')),
|
||||||
]);
|
decipher.final()
|
||||||
return decrpyted.toString();
|
]);
|
||||||
|
return decrpyted.toString();
|
||||||
|
} catch (error) {
|
||||||
|
console.log({ decryptionError: error.message })
|
||||||
|
return hashString
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
export const encrypt = (text: string) => {
|
export const encrypt = (text: string) => {
|
||||||
@@ -867,6 +873,11 @@ export function generateDatabaseConfiguration(database: any, arch: string):
|
|||||||
}
|
}
|
||||||
if (isARM(arch)) {
|
if (isARM(arch)) {
|
||||||
configuration.volume = `${id}-${type}-data:/var/lib/postgresql`;
|
configuration.volume = `${id}-${type}-data:/var/lib/postgresql`;
|
||||||
|
configuration.environmentVariables = {
|
||||||
|
POSTGRES_PASSWORD: dbUserPassword,
|
||||||
|
POSTGRES_USER: dbUser,
|
||||||
|
POSTGRES_DB: defaultDatabase
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return configuration
|
return configuration
|
||||||
} else if (type === 'redis') {
|
} else if (type === 'redis') {
|
||||||
@@ -903,7 +914,7 @@ export function generateDatabaseConfiguration(database: any, arch: string):
|
|||||||
return configuration
|
return configuration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export function isARM(arch) {
|
export function isARM(arch: string) {
|
||||||
if (arch === 'arm' || arch === 'arm64') {
|
if (arch === 'arm' || arch === 'arm64') {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -1226,7 +1237,6 @@ export async function startTraefikTCPProxy(
|
|||||||
}
|
}
|
||||||
traefikUrl = `${ip}/webhooks/traefik/other.json`
|
traefikUrl = `${ip}/webhooks/traefik/other.json`
|
||||||
}
|
}
|
||||||
console.log(traefikUrl)
|
|
||||||
const tcpProxy = {
|
const tcpProxy = {
|
||||||
version: '3.8',
|
version: '3.8',
|
||||||
services: {
|
services: {
|
||||||
@@ -1291,6 +1301,7 @@ export async function getServiceFromDB({ id, teamId }: { id: string; teamId: str
|
|||||||
return s;
|
return s;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
body[type] = { ...body[type], ...getUpdateableFields(type, body[type]) }
|
body[type] = { ...body[type], ...getUpdateableFields(type, body[type]) }
|
||||||
return { ...body, settings };
|
return { ...body, settings };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ export const fider = [{
|
|||||||
isBoolean: false,
|
isBoolean: false,
|
||||||
isEncrypted: true
|
isEncrypted: true
|
||||||
}, {
|
}, {
|
||||||
name: 'postgreslUser',
|
name: 'postgresqlUser',
|
||||||
isEditable: false,
|
isEditable: false,
|
||||||
isLowerCase: false,
|
isLowerCase: false,
|
||||||
isNumber: false,
|
isNumber: false,
|
||||||
|
|||||||
@@ -197,13 +197,11 @@ export async function getService(request: FastifyRequest<OnlyId>) {
|
|||||||
const teamId = request.user.teamId;
|
const teamId = request.user.teamId;
|
||||||
const { id } = request.params;
|
const { id } = request.params;
|
||||||
const service = await getServiceFromDB({ id, teamId });
|
const service = await getServiceFromDB({ id, teamId });
|
||||||
const settings = await listSettings()
|
|
||||||
if (!service) {
|
if (!service) {
|
||||||
throw { status: 404, message: 'Service not found.' }
|
throw { status: 404, message: 'Service not found.' }
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
service,
|
service
|
||||||
settings
|
|
||||||
}
|
}
|
||||||
} catch ({ status, message }) {
|
} catch ({ status, message }) {
|
||||||
return errorHandler({ status, message })
|
return errorHandler({ status, message })
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
import { get, post } from '$lib/api';
|
import { get, post } from '$lib/api';
|
||||||
import Usage from '$lib/components/Usage.svelte';
|
import Usage from '$lib/components/Usage.svelte';
|
||||||
import { t } from '$lib/translations';
|
import { t } from '$lib/translations';
|
||||||
import { errorNotification } from '$lib/common';
|
import { errorNotification, asyncSleep } from '$lib/common';
|
||||||
import { addToast, appSession } from '$lib/store';
|
import { addToast, appSession } from '$lib/store';
|
||||||
|
|
||||||
import ApplicationsIcons from '$lib/components/svg/applications/ApplicationIcons.svelte';
|
import ApplicationsIcons from '$lib/components/svg/applications/ApplicationIcons.svelte';
|
||||||
@@ -37,8 +37,18 @@
|
|||||||
export let applications: any;
|
export let applications: any;
|
||||||
export let databases: any;
|
export let databases: any;
|
||||||
export let services: 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) {
|
async function getStatus(resources: any) {
|
||||||
|
while (numberOfGetStatus > 1){
|
||||||
|
await asyncSleep(getRndInteger(100,200));
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
|
numberOfGetStatus++;
|
||||||
const { id, buildPack, dualCerts } = resources;
|
const { id, buildPack, dualCerts } = resources;
|
||||||
let isRunning = false;
|
let isRunning = false;
|
||||||
if (buildPack) {
|
if (buildPack) {
|
||||||
@@ -58,7 +68,9 @@
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return 'Error';
|
return 'Error';
|
||||||
}
|
} finally {
|
||||||
|
numberOfGetStatus--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
async function manuallyCleanupStorage() {
|
async function manuallyCleanupStorage() {
|
||||||
try {
|
try {
|
||||||
@@ -82,7 +94,6 @@
|
|||||||
>Cleanup Storage</button
|
>Cleanup Storage</button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-10 pb-12 tracking-tight sm:pb-16">
|
<div class="mt-10 pb-12 tracking-tight sm:pb-16">
|
||||||
<div class="mx-auto px-10">
|
<div class="mx-auto px-10">
|
||||||
<div class="flex flex-col justify-center xl:flex-row">
|
<div class="flex flex-col justify-center xl:flex-row">
|
||||||
@@ -113,7 +124,7 @@
|
|||||||
Application
|
Application
|
||||||
</div></td
|
</div></td
|
||||||
>
|
>
|
||||||
<td>
|
<td class="flex justify-end">
|
||||||
{#if application.fqdn}
|
{#if application.fqdn}
|
||||||
<a
|
<a
|
||||||
href={application.fqdn}
|
href={application.fqdn}
|
||||||
@@ -189,7 +200,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td class="flex justify-end">
|
||||||
{#if service.fqdn}
|
{#if service.fqdn}
|
||||||
<a
|
<a
|
||||||
href={service.fqdn}
|
href={service.fqdn}
|
||||||
@@ -263,7 +274,7 @@
|
|||||||
Database
|
Database
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="flex justify-end">
|
||||||
<a
|
<a
|
||||||
href={`/databases/${database.id}`}
|
href={`/databases/${database.id}`}
|
||||||
class="icons bg-transparent text-sm inline-flex ml-11"
|
class="icons bg-transparent text-sm inline-flex ml-11"
|
||||||
|
|||||||
2
csb.nix
2
csb.nix
@@ -1,7 +1,7 @@
|
|||||||
with import <nixpkgs> {};
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "git";
|
name = "environment";
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
git
|
git
|
||||||
git-lfs
|
git-lfs
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "coolify",
|
"name": "coolify",
|
||||||
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
||||||
"version": "3.3.1",
|
"version": "3.3.3",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": "github:coollabsio/coolify",
|
"repository": "github:coollabsio/coolify",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user