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.

fix: Demo instance save domain instantly

Andras Bacsaie2bf02841f4d
diff --git a/src/routes/applications/[id]/index.svelte b/src/routes/applications/[id]/index.svelte
index 6b3d09dd76..a00f08d2fc 100644
--- a/src/routes/applications/[id]/index.svelte
+++ b/src/routes/applications/[id]/index.svelte
@@ -88,9 +88,7 @@
function containerClass() {
return 'text-white border border-dashed border-coolgray-300 bg-transparent font-thin px-0';
}
- if (browser && window.location.hostname === 'demo.coolify.io' && !application.fqdn) {
- application.fqdn = `http://${cuid()}.demo.coolify.io`;
- }
+
async function getUsage() {
if (usageLoading) return;
usageLoading = true;
@@ -102,6 +100,10 @@
clearInterval(usageInterval);
});
onMount(async () => {
+ if (browser && window.location.hostname === 'demo.coolify.io' && !application.fqdn) {
+ application.fqdn = `http://${cuid()}.demo.coolify.io`;
+ await handleSubmit();
+ }
domainEl.focus();
await getUsage();
usageInterval = setInterval(async () => {
@@ -149,6 +151,7 @@
}
}
async function handleSubmit() {
+ if (loading) return;
loading = true;
try {
nonWWWDomain = application.fqdn && getDomain(application.fqdn).replace(/^www\./, '');