diff --git a/package.json b/package.json index 540159be6..de29527fc 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "2.0.17", + "version": "2.0.18", "license": "AGPL-3.0", "scripts": { - "dev": "docker compose -f docker-compose-dev.yaml up -d && NODE_ENV=development svelte-kit dev --host 0.0.0.0", - "dev:stop": "docker compose -f docker-compose-dev.yaml down", - "dev:logs": "docker compose -f docker-compose-dev.yaml logs -f --tail 10", + "dev": "docker-compose -f docker-compose-dev.yaml up -d && NODE_ENV=development svelte-kit dev --host 0.0.0.0", + "dev:stop": "docker-compose -f docker-compose-dev.yaml down", + "dev:logs": "docker-compose -f docker-compose-dev.yaml logs -f --tail 10", "studio": "npx prisma studio", "start": "npx prisma migrate deploy && npx prisma generate && npx prisma db seed && node index.js", "build": "svelte-kit build", diff --git a/prisma/migrations/20220220141136_public_portrange/migration.sql b/prisma/migrations/20220220141136_public_portrange/migration.sql new file mode 100644 index 000000000..6423e9761 --- /dev/null +++ b/prisma/migrations/20220220141136_public_portrange/migration.sql @@ -0,0 +1,20 @@ +-- RedefineTables +PRAGMA foreign_keys=OFF; +CREATE TABLE "new_Setting" ( + "id" TEXT NOT NULL PRIMARY KEY, + "fqdn" TEXT, + "isRegistrationEnabled" BOOLEAN NOT NULL DEFAULT false, + "dualCerts" BOOLEAN NOT NULL DEFAULT false, + "minPort" INTEGER NOT NULL DEFAULT 9000, + "maxPort" INTEGER NOT NULL DEFAULT 9100, + "proxyPassword" TEXT NOT NULL, + "proxyUser" TEXT NOT NULL, + "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" DATETIME NOT NULL +); +INSERT INTO "new_Setting" ("createdAt", "dualCerts", "fqdn", "id", "isRegistrationEnabled", "proxyPassword", "proxyUser", "updatedAt") SELECT "createdAt", "dualCerts", "fqdn", "id", "isRegistrationEnabled", "proxyPassword", "proxyUser", "updatedAt" FROM "Setting"; +DROP TABLE "Setting"; +ALTER TABLE "new_Setting" RENAME TO "Setting"; +CREATE UNIQUE INDEX "Setting_fqdn_key" ON "Setting"("fqdn"); +PRAGMA foreign_key_check; +PRAGMA foreign_keys=ON; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 7599602fb..fefc32561 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -12,6 +12,8 @@ model Setting { fqdn String? @unique isRegistrationEnabled Boolean @default(false) dualCerts Boolean @default(false) + minPort Int @default(9000) + maxPort Int @default(9100) proxyPassword String proxyUser String createdAt DateTime @default(now()) diff --git a/src/lib/components/CopyPasswordField.svelte b/src/lib/components/CopyPasswordField.svelte index 648fc3278..cb207b475 100644 --- a/src/lib/components/CopyPasswordField.svelte +++ b/src/lib/components/CopyPasswordField.svelte @@ -15,16 +15,12 @@ export let placeholder = ''; let disabledClass = 'bg-coolback disabled:bg-coolblack'; - let actionsShow = false; let isHttps = browser && window.location.protocol === 'https:'; - function showActions(value) { - actionsShow = value; - } function copyToClipboard() { if (isHttps && navigator.clipboard) { navigator.clipboard.writeText(value); - toast.push('Copied to clipboard'); + toast.push('Copied to clipboard.'); } } @@ -33,7 +29,7 @@ {#if !isPasswordField || showPassword} {#if textarea}