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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
feat: Random subdomain for demo
Andras Bacsaibb32d0f7d1b3
diff --git a/src/routes/applications/[id]/index.svelte b/src/routes/applications/[id]/index.svelteindex 54f7e945f5..3f8fe3fde0 100644--- a/src/routes/applications/[id]/index.svelte+++ b/src/routes/applications/[id]/index.svelte@@ -45,6 +45,8 @@import { notNodeDeployments, staticDeployments } from '$lib/components/common';import { toast } from '@zerodevx/svelte-toast';import { post } from '$lib/api';+ import cuid from 'cuid';+ import { browser } from '$app/env';const { id } = $page.params;let domainEl: HTMLInputElement;@@ -55,6 +57,10 @@let previews = application.settings.previews;let dualCerts = application.settings.dualCerts;+ if (browser && window.location.hostname === 'demo.coolify.io') {+ application.fqdn = `${cuid()}.demo.coolify.io`;+ }+onMount(() => {domainEl.focus();});@@ -255,6 +261,11 @@<div class="grid grid-cols-2"><div class="flex-col"><label for="fqdn" class="pt-2 text-base font-bold text-stone-100">Domain (FQDN)</label>+ {#if browser && window.location.hostname === 'demo.coolify.io'}+ <Explainer+ text="<span class='text-white font-bold'>You can use the predefined random domain name or enter your own domain name.</span>"+ />+ {/if}<Explainertext="If you specify <span class='text-green-500 font-bold'>https</span>, the application will be accessible only over https. SSL certificate will be generated for you.<br>If you specify <span class='text-green-500 font-bold'>www</span>, the application will be redirected (302) from non-www and vice versa.<br><br>To modify the domain, you must first stop the application.<br><br><span class='text-white font-bold'>You must set your DNS to point to the server IP in advance.</span>"/>