Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

feat: Basic white labeled version

Andras Bacsai3e8a8364dcb1
diff --git a/src/app.d.ts b/src/app.d.ts
index 0557299b92..a88bd7502d 100644
--- a/src/app.d.ts
+++ b/src/app.d.ts
@@ -19,14 +19,13 @@ declare namespace App {
}
interface SessionData {
+ whiteLabeled: boolean;
version?: string;
userId?: string | null;
teamId?: string | null;
permission?: string;
isAdmin?: boolean;
expires?: string | null;
- gitlabToken?: string | null;
- ghToken?: string | null;
}
type DateTimeFormatOptions = {
diff --git a/src/app.html b/src/app.html
index 2dc97f37db..a0336e87db 100644
--- a/src/app.html
+++ b/src/app.html
@@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="utf-8" />
- <link rel="icon" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Coolify</title>
%svelte.head%
diff --git a/src/hooks.ts b/src/hooks.ts
index d6c6eca6df..c72c7fd6ca 100644
--- a/src/hooks.ts
+++ b/src/hooks.ts
@@ -7,6 +7,8 @@ import { version } from '$lib/common';
import cookie from 'cookie';
import { dev } from '$app/env';
+const whiteLabeled = process.env['COOLIFY_WHITE_LABELED'] === 'true';
+
export const handle = handleSession(
{
secret: process.env['COOLIFY_SECRET_KEY'],
@@ -71,6 +73,7 @@ export const handle = handleSession(
export const getSession: GetSession = function ({ locals }) {
return {
version,
+ whiteLabeled,
...locals.session.data
};
};
diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte
index ce9cd7c0ff..8d59224505 100644
--- a/src/routes/__layout.svelte
+++ b/src/routes/__layout.svelte
@@ -134,13 +134,18 @@
<svelte:head>
<title>Coolify</title>
+ {#if !$session.whiteLabeled}
+ <link rel="icon" href="/favicon.png" />
+ {/if}
</svelte:head>
<SvelteToast options={{ intro: { y: -64 }, duration: 3000, pausable: true }} />
{#if $session.userId}
<nav class="nav-main">
<div class="flex h-screen w-full flex-col items-center transition-all duration-100">
- <div class="my-4 h-10 w-10"><img src="/favicon.png" alt="coolLabs logo" /></div>
- <div class="flex flex-col space-y-4 py-2">
+ {#if !$session.whiteLabeled}
+ <div class="my-4 h-10 w-10"><img src="/favicon.png" alt="coolLabs logo" /></div>
+ {/if}
+ <div class="flex flex-col space-y-4 py-2" class:mt-2={$session.whiteLabeled}>
<a
sveltekit:prefetch
href="/"
@@ -312,7 +317,6 @@
<path d="M7 18a4.6 4.4 0 0 1 0 -9a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-12" />
</svg>
</a>
- <div class="border-t border-stone-700" />
</div>
<div class="flex-1" />
@@ -514,6 +518,12 @@
</div>
</div>
</nav>
+ {#if $session.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
+ >
+ {/if}
+
<select
class="fixed right-0 bottom-0 z-50 m-2 w-64 bg-opacity-30 p-2 px-4"
bind:value={selectedTeamId}