diff --git a/package.json b/package.json index aeda4ada6..b51c1160f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "2.4.7", + "version": "2.4.8", "license": "AGPL-3.0", "scripts": { "dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev", diff --git a/src/lib/database/gitSources.ts b/src/lib/database/gitSources.ts index 4d3374344..a0c0b94ed 100644 --- a/src/lib/database/gitSources.ts +++ b/src/lib/database/gitSources.ts @@ -90,7 +90,7 @@ export async function addGitLabSource({ appSecret, groupName }) { - const encrptedAppSecret = encrypt(appSecret); + const encryptedAppSecret = encrypt(appSecret); await prisma.gitSource.update({ where: { id }, data: { type, apiUrl, htmlUrl, name } }); return await prisma.gitlabApp.create({ data: { diff --git a/src/lib/database/users.ts b/src/lib/database/users.ts index cdabf3588..b74c8de4c 100644 --- a/src/lib/database/users.ts +++ b/src/lib/database/users.ts @@ -46,8 +46,12 @@ export async function login({ if (users === 0) { await prisma.setting.update({ where: { id }, data: { isRegistrationEnabled: false } }); // Create default network & start Coolify Proxy - await asyncExecShell(`docker network create --attachable coolify`); - await startCoolifyProxy('/var/run/docker.sock'); + try { + await asyncExecShell(`docker network create --attachable coolify`); + } catch (error) {} + try { + await startCoolifyProxy('/var/run/docker.sock'); + } catch (error) {} uid = '0'; } diff --git a/src/lib/letsencrypt/index.ts b/src/lib/letsencrypt/index.ts index a3a1522e1..f9de8bc1d 100644 --- a/src/lib/letsencrypt/index.ts +++ b/src/lib/letsencrypt/index.ts @@ -215,7 +215,7 @@ export async function generateSSLCerts(): Promise { certificates.includes(ssl.domain) || certificates.includes(ssl.domain.replace('www.', '')) ) { - console.log(`Certificate for ${ssl.domain} already exists`); + // console.log(`Certificate for ${ssl.domain} already exists`); } else { // Checking DNS entry before generating certificate if (ipv4 || ipv6) { @@ -232,7 +232,7 @@ export async function generateSSLCerts(): Promise { (ipv4 && domains4.includes(ipv4.replace('\n', ''))) || (ipv6 && domains6.includes(ipv6.replace('\n', ''))) ) { - console.log('Generating SSL for', ssl.domain, '.'); + console.log('Generating SSL for', ssl.domain); return await letsEncrypt(ssl.domain, ssl.id, ssl.isCoolify); } } @@ -261,7 +261,7 @@ export async function generateSSLCerts(): Promise { (ipv4 && domains4.includes(ipv4.replace('\n', ''))) || (ipv6 && domains6.includes(ipv6.replace('\n', ''))) ) { - console.log('Generating SSL for', ssl.domain, '.'); + console.log('Generating SSL for', ssl.domain); return; } } diff --git a/src/lib/settings.ts b/src/lib/settings.ts index 211852c06..4e13f4f0f 100644 --- a/src/lib/settings.ts +++ b/src/lib/settings.ts @@ -1,8 +1,6 @@ export const publicPaths = [ '/login', '/register', - '/reset', - '/reset/password', '/webhooks/success', '/webhooks/github', '/webhooks/github/install', diff --git a/src/routes/login/index.svelte b/src/routes/login/index.svelte index b321bc086..f37d8aa45 100644 --- a/src/routes/login/index.svelte +++ b/src/routes/login/index.svelte @@ -76,10 +76,6 @@ on:click|preventDefault={() => goto('/register')} class="bg-transparent hover:bg-coolgray-300 text-white ">Register - diff --git a/src/routes/register/index.svelte b/src/routes/register/index.svelte index 0b2183444..b41d6f46a 100644 --- a/src/routes/register/index.svelte +++ b/src/routes/register/index.svelte @@ -105,6 +105,9 @@ {#if userCount === 0}
You are registering the first user. It will be the administrator of your Coolify instance. +
+ It will take a while, because Coolify will configure itself, the proxy and other docker related + stuff.
{/if} {/if} diff --git a/src/routes/reset/index.json.ts b/src/routes/reset/index.json.ts deleted file mode 100644 index a75ea4766..000000000 --- a/src/routes/reset/index.json.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { RequestHandler } from '@sveltejs/kit'; -import * as db from '$lib/database'; - -export const get: RequestHandler = async () => { - const users = await db.prisma.user.findMany({}); - return { - status: 200, - body: { - users - } - }; -}; -export const post: RequestHandler = async (event) => { - const { secretKey } = await event.request.json(); - if (secretKey !== process.env.COOLIFY_SECRET_KEY) { - return { - status: 500, - body: { - error: 'Invalid secret key.' - } - }; - } - return { - status: 200 - }; -}; diff --git a/src/routes/reset/index.svelte b/src/routes/reset/index.svelte deleted file mode 100644 index 498c63e64..000000000 --- a/src/routes/reset/index.svelte +++ /dev/null @@ -1,96 +0,0 @@ - - -
goto('/')}> - - - - - - -
-
Reset Password
-
- {#if password} - - - - - - - - - {#each users as user} - - - - - {/each} - -
EmailNew password
{user.email} - -
- {:else} -
-
Secret Key
- - - - {/if} -
diff --git a/src/routes/reset/password.json.ts b/src/routes/reset/password.json.ts deleted file mode 100644 index 28e9d56e3..000000000 --- a/src/routes/reset/password.json.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { RequestHandler } from '@sveltejs/kit'; -import * as db from '$lib/database'; -import { ErrorHandler, hashPassword } from '$lib/database'; - -export const post: RequestHandler = async (event) => { - const { secretKey, user } = await event.request.json(); - if (secretKey !== process.env.COOLIFY_SECRET_KEY) { - return { - status: 500, - body: { - error: 'Invalid secret key.' - } - }; - } - try { - const hashedPassword = await hashPassword(user.newPassword); - await db.prisma.user.update({ - where: { email: user.email }, - data: { password: hashedPassword } - }); - return { - status: 200 - }; - } catch (error) { - return ErrorHandler(error); - } -};