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 1/7] 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 2/7] 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 3/7] 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 4/7] 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 5/7] 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 6/7] 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 7/7] 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)