From 12c263c1ce4bc103009f94042397207136a4e5e1 Mon Sep 17 00:00:00 2001 From: Michiel Crefcoeur Date: Mon, 16 Sep 2024 07:58:34 -0700 Subject: [PATCH 01/13] Corrected language for creating applications from a template The UI used the word "Deploy" while actually it's creating a new application from a template and adding it to the project. I fixed some of the language to better reflect what it does. --- .../components/dashboard/project/add-template.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/dokploy/components/dashboard/project/add-template.tsx b/apps/dokploy/components/dashboard/project/add-template.tsx index 28f85414..a9d13f6c 100644 --- a/apps/dokploy/components/dashboard/project/add-template.tsx +++ b/apps/dokploy/components/dashboard/project/add-template.tsx @@ -89,9 +89,9 @@ export const AddTemplate = ({ projectId }: Props) => {
- Create Template + Create from Template - Deploy a open source template to your project + Create an open source application from a template {isError && {error?.message}} @@ -255,7 +255,7 @@ export const AddTemplate = ({ projectId }: Props) => { @@ -264,8 +264,8 @@ export const AddTemplate = ({ projectId }: Props) => { Are you absolutely sure? - This will deploy {template.name} template to - your project. + This will create an application from the {template.name} + template and add it to your project. @@ -278,7 +278,7 @@ export const AddTemplate = ({ projectId }: Props) => { }) .then(async () => { toast.success( - `${template.name} template created succesfully`, + `Succesfully created ${template.name} application from template`, ); utils.project.one.invalidate({ @@ -288,7 +288,7 @@ export const AddTemplate = ({ projectId }: Props) => { }) .catch(() => { toast.error( - `Error to delete ${template.name} template`, + `Error creating ${template.name} application from template`, ); }); }} From 5b5aeb545a5c29063b13e3397fb59f29b8932135 Mon Sep 17 00:00:00 2001 From: Michiel Crefcoeur Date: Mon, 16 Sep 2024 09:40:53 -0700 Subject: [PATCH 02/13] Satisfy CI? --- apps/dokploy/components/dashboard/project/add-template.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/dokploy/components/dashboard/project/add-template.tsx b/apps/dokploy/components/dashboard/project/add-template.tsx index a9d13f6c..2467f91f 100644 --- a/apps/dokploy/components/dashboard/project/add-template.tsx +++ b/apps/dokploy/components/dashboard/project/add-template.tsx @@ -264,8 +264,7 @@ export const AddTemplate = ({ projectId }: Props) => { Are you absolutely sure? - This will create an application from the {template.name} - template and add it to your project. + This will create an application from the {template.name} template and add it to your project. From 66567c8f2bac48235456c4943babcd70689f4f39 Mon Sep 17 00:00:00 2001 From: Michiel Crefcoeur Date: Mon, 16 Sep 2024 18:45:22 +0000 Subject: [PATCH 03/13] obey formatting even though it looks weird --- apps/dokploy/components/dashboard/project/add-template.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/project/add-template.tsx b/apps/dokploy/components/dashboard/project/add-template.tsx index 2467f91f..1bc78f48 100644 --- a/apps/dokploy/components/dashboard/project/add-template.tsx +++ b/apps/dokploy/components/dashboard/project/add-template.tsx @@ -264,7 +264,9 @@ export const AddTemplate = ({ projectId }: Props) => { Are you absolutely sure? - This will create an application from the {template.name} template and add it to your project. + This will create an application from the{" "} + {template.name} template and add it to your + project. From 754bb75e2a3f394442dae81924fe25fb130b448d Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:19:26 -0600 Subject: [PATCH 04/13] fix(settings): remove stats logs from swagger --- apps/dokploy/server/api/routers/settings.ts | 32 ++++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/apps/dokploy/server/api/routers/settings.ts b/apps/dokploy/server/api/routers/settings.ts index f98b981b..00df9b82 100644 --- a/apps/dokploy/server/api/routers/settings.ts +++ b/apps/dokploy/server/api/routers/settings.ts @@ -356,18 +356,28 @@ export const settingsRouter = createTRPCRouter({ return false; }), - readStatsLogs: adminProcedure.input(apiReadStatsLogs).query(({ input }) => { - const rawConfig = readMonitoringConfig(); - const parsedConfig = parseRawConfig( - rawConfig as string, - input.page, - input.sort, - input.search, - input.status, - ); + readStatsLogs: adminProcedure + .meta({ + openapi: { + path: "/read-stats-logs", + method: "POST", + override: true, + enabled: false, + }, + }) + .input(apiReadStatsLogs) + .query(({ input }) => { + const rawConfig = readMonitoringConfig(); + const parsedConfig = parseRawConfig( + rawConfig as string, + input.page, + input.sort, + input.search, + input.status, + ); - return parsedConfig; - }), + return parsedConfig; + }), readStats: adminProcedure.query(() => { const rawConfig = readMonitoringConfig(); const processedLogs = processLogs(rawConfig as string); From 5f558f3773e90637471a2aec192e3c1e20c1f071 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:21:39 -0600 Subject: [PATCH 05/13] fix(cluster): add registry none when is empty registry id --- .../application/advanced/cluster/show-cluster-settings.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx b/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx index 4078ae4c..d8d32e19 100644 --- a/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx +++ b/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx @@ -81,7 +81,10 @@ export const ShowClusterSettings = ({ applicationId }: Props) => { const onSubmit = async (data: AddCommand) => { await mutateAsync({ applicationId, - registryId: data?.registryId === "none" ? null : data?.registryId, + registryId: + data?.registryId === "none" || !data?.registryId + ? null + : data?.registryId, replicas: data?.replicas, }) .then(async () => { From 92df2472aeedf941f3aa6c95112ac2284b4a4701 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:22:50 -0600 Subject: [PATCH 06/13] chore(version): bump version --- apps/dokploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json index 03668718..ccc1bc14 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -1,6 +1,6 @@ { "name": "dokploy", - "version": "v0.8.1", + "version": "v0.8.2", "private": true, "license": "Apache-2.0", "type": "module", From f25d78a87d7a7590788f27070467e26739111f71 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Wed, 18 Sep 2024 23:06:40 -0600 Subject: [PATCH 07/13] fix(compose): prevent to pass dokploy database url in docker compose containers #460 --- apps/dokploy/server/utils/builders/compose.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/dokploy/server/utils/builders/compose.ts b/apps/dokploy/server/utils/builders/compose.ts index 10e56aba..cc071131 100644 --- a/apps/dokploy/server/utils/builders/compose.ts +++ b/apps/dokploy/server/utils/builders/compose.ts @@ -53,6 +53,10 @@ Compose Type: ${composeType} ✅`; }, { cwd: projectPath, + env: { + NODE_ENV: process.env.NODE_ENV, + PATH: process.env.PATH, + }, }, ); From c8f990d541cb1328c8dc35647566731758c8eee5 Mon Sep 17 00:00:00 2001 From: Max Degterev Date: Thu, 19 Sep 2024 23:01:24 +0200 Subject: [PATCH 08/13] fix domain creation not returning domain data --- apps/dokploy/server/api/routers/domain.ts | 2 +- apps/dokploy/server/api/services/domain.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/server/api/routers/domain.ts b/apps/dokploy/server/api/routers/domain.ts index 309dd91a..3db43e56 100644 --- a/apps/dokploy/server/api/routers/domain.ts +++ b/apps/dokploy/server/api/routers/domain.ts @@ -27,7 +27,7 @@ export const domainRouter = createTRPCRouter({ .input(apiCreateDomain) .mutation(async ({ input }) => { try { - await createDomain(input); + return await createDomain(input); } catch (error) { throw new TRPCError({ code: "BAD_REQUEST", diff --git a/apps/dokploy/server/api/services/domain.ts b/apps/dokploy/server/api/services/domain.ts index 53687d28..0b9c15fe 100644 --- a/apps/dokploy/server/api/services/domain.ts +++ b/apps/dokploy/server/api/services/domain.ts @@ -26,7 +26,7 @@ export const createDomain = async (input: typeof apiCreateDomain._type) => { if (!domain) { throw new TRPCError({ code: "BAD_REQUEST", - message: "Error to create the domain", + message: "Error creating domain", }); } @@ -34,6 +34,8 @@ export const createDomain = async (input: typeof apiCreateDomain._type) => { const application = await findApplicationById(domain.applicationId); await manageDomain(application, domain); } + + return domain; }); }; From 04a59c5e214d8991ef50bc876aea49444006e274 Mon Sep 17 00:00:00 2001 From: Max Degterev Date: Thu, 19 Sep 2024 23:21:26 +0200 Subject: [PATCH 09/13] linter errors From 72b1600cd459c2f64bd608618e6194acff088aa9 Mon Sep 17 00:00:00 2001 From: Max Degterev Date: Thu, 19 Sep 2024 23:23:47 +0200 Subject: [PATCH 10/13] linter errors --- apps/dokploy/server/api/services/domain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dokploy/server/api/services/domain.ts b/apps/dokploy/server/api/services/domain.ts index 0b9c15fe..2613f2cc 100644 --- a/apps/dokploy/server/api/services/domain.ts +++ b/apps/dokploy/server/api/services/domain.ts @@ -35,7 +35,7 @@ export const createDomain = async (input: typeof apiCreateDomain._type) => { await manageDomain(application, domain); } - return domain; + return domain; }); }; From 3ded0d21d041d7d51ae65340944c06a10f64c6dc Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:48:09 -0600 Subject: [PATCH 11/13] chore(version): bump version --- apps/dokploy/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json index ccc1bc14..3c17a7e9 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -1,6 +1,6 @@ { "name": "dokploy", - "version": "v0.8.2", + "version": "v0.8.3", "private": true, "license": "Apache-2.0", "type": "module", From 6c08f33ebb80fdabd562217dc60b795df66b41f5 Mon Sep 17 00:00:00 2001 From: Max Degterev Date: Fri, 20 Sep 2024 01:42:28 +0200 Subject: [PATCH 12/13] missing transaction return --- apps/dokploy/server/api/services/domain.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/dokploy/server/api/services/domain.ts b/apps/dokploy/server/api/services/domain.ts index 2613f2cc..927b144d 100644 --- a/apps/dokploy/server/api/services/domain.ts +++ b/apps/dokploy/server/api/services/domain.ts @@ -14,7 +14,7 @@ import { findApplicationById } from "./application"; export type Domain = typeof domains.$inferSelect; export const createDomain = async (input: typeof apiCreateDomain._type) => { - await db.transaction(async (tx) => { + const result = await db.transaction(async (tx) => { const domain = await tx .insert(domains) .values({ @@ -37,6 +37,8 @@ export const createDomain = async (input: typeof apiCreateDomain._type) => { return domain; }); + + return result; }; export const generateTraefikMeDomain = async (appName: string) => { From ff382d2029cd9b3d24b917946384b0729393e21c Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Thu, 19 Sep 2024 23:33:36 -0600 Subject: [PATCH 13/13] Update installation.mdx --- apps/docs/content/docs/core/get-started/installation.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/docs/content/docs/core/get-started/installation.mdx b/apps/docs/content/docs/core/get-started/installation.mdx index 96e264b3..4bd4490f 100644 --- a/apps/docs/content/docs/core/get-started/installation.mdx +++ b/apps/docs/content/docs/core/get-started/installation.mdx @@ -29,7 +29,7 @@ We have tested on the following Linux Distros: ### Providers -- [Hostinger](https://www.hostinger.com/vps-hosting?ref=dokploy) Get 20% Discount using this referral link: [Referral Link](https://hostinger.com?REFERRALCODE=1SIUMAURICI97) +- [Hostinger](https://www.hostinger.com/vps-hosting?ref=dokploy) Get 20% Discount using this referral link: [Referral Link](https://www.hostinger.com/vps-hosting?REFERRALCODE=1SIUMAURICI97) - [DigitalOcean](https://www.digitalocean.com/pricing/droplets#basic-droplets) Get 200$ credits for free with this referral link: [Referral Link](https://m.do.co/c/db24efd43f35) - [Hetzner](https://www.hetzner.com/cloud/) Get 20€ credits for free with this referral link: [Referral Link](https://hetzner.cloud/?ref=vou4fhxJ1W2D) - [Linode](https://www.linode.com/es/pricing/#compute-shared)