diff --git a/README-de.md b/README-de.md index 2d673406..d9afbd41 100644 --- a/README-de.md +++ b/README-de.md @@ -39,10 +39,17 @@ curl -sSL https://dokploy.com/install.sh | sh Getestete Systems: -- Ubuntu 20.04 +- Ubuntu 24.04 LTS (Noble Numbat) +- Ubuntu 23.10 (Mantic Minotaur) +- Ubuntu 22.04 LTS (Jammy Jellyfish) +- Ubuntu 20.04 LTS (Focal Fossa) +- Ubuntu 18.04 LTS (Bionic Beaver) +- Debian 12 - Debian 11 - Fedora 40 - Centos 9 +- Centos 8 + ## 📄 Dokumentation diff --git a/README-ru.md b/README-ru.md index 5f07d38d..52881a4e 100644 --- a/README-ru.md +++ b/README-ru.md @@ -40,10 +40,17 @@ curl -sSL https://dokploy.com/install.sh | sh Проверенные системы: -- Ubuntu 20.04 +- Ubuntu 24.04 LTS (Noble Numbat) +- Ubuntu 23.10 (Mantic Minotaur) +- Ubuntu 22.04 LTS (Jammy Jellyfish) +- Ubuntu 20.04 LTS (Focal Fossa) +- Ubuntu 18.04 LTS (Bionic Beaver) +- Debian 12 - Debian 11 - Fedora 40 - Centos 9 +- Centos 8 + ## 📄 Документация Для подробной документации посетите [docs.dokploy.com/docs](https://docs.dokploy.com). diff --git a/README-zh.md b/README-zh.md index 1832800c..35c7fc1f 100644 --- a/README-zh.md +++ b/README-zh.md @@ -43,10 +43,17 @@ curl -sSL https://dokploy.com/install.sh | sh 经过测试的系统: -- Ubuntu 20.04 +- Ubuntu 24.04 LTS (Noble Numbat) +- Ubuntu 23.10 (Mantic Minotaur) +- Ubuntu 22.04 LTS (Jammy Jellyfish) +- Ubuntu 20.04 LTS (Focal Fossa) +- Ubuntu 18.04 LTS (Bionic Beaver) +- Debian 12 - Debian 11 - Fedora 40 - Centos 9 +- Centos 8 + ## 📄 文档 diff --git a/README.md b/README.md index 28c11f9a..58cb0961 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,16 @@ curl -sSL https://dokploy.com/install.sh | sh Tested Systems: -- Ubuntu 20.04 +- Ubuntu 24.04 LTS (Noble Numbat) +- Ubuntu 23.10 (Mantic Minotaur) +- Ubuntu 22.04 LTS (Jammy Jellyfish) +- Ubuntu 20.04 LTS (Focal Fossa) +- Ubuntu 18.04 LTS (Bionic Beaver) +- Debian 12 - Debian 11 - Fedora 40 - Centos 9 +- Centos 8 ## 📄 Documentation diff --git a/components/dashboard/application/advanced/ports/add-port.tsx b/components/dashboard/application/advanced/ports/add-port.tsx index 52b303a5..76939d82 100644 --- a/components/dashboard/application/advanced/ports/add-port.tsx +++ b/components/dashboard/application/advanced/ports/add-port.tsx @@ -183,8 +183,7 @@ export const AddPort = ({ - - None + TCP UDP diff --git a/components/dashboard/application/general/deploy-application.tsx b/components/dashboard/application/general/deploy-application.tsx index 4ce1bb87..47fbb5c0 100644 --- a/components/dashboard/application/general/deploy-application.tsx +++ b/components/dashboard/application/general/deploy-application.tsx @@ -11,6 +11,7 @@ import { } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; import { api } from "@/utils/api"; +import { useEffect, useState } from "react"; import { toast } from "sonner"; interface Props { @@ -51,18 +52,14 @@ export const DeployApplication = ({ applicationId }: Props) => { applicationId, }) .then(async () => { - toast.success("Application Deploying...."); + toast.success("Deploying Application...."); await refetch(); await deploy({ applicationId, - }) - .then(() => { - toast.success("Application Deployed Succesfully"); - }) - .catch(() => { - toast.error("Error to deploy Application"); - }); + }).catch(() => { + toast.error("Error to deploy Application"); + }); await refetch(); }) diff --git a/components/dashboard/compose/general/deploy-compose.tsx b/components/dashboard/compose/general/deploy-compose.tsx index 3b5bb11b..1617ee7b 100644 --- a/components/dashboard/compose/general/deploy-compose.tsx +++ b/components/dashboard/compose/general/deploy-compose.tsx @@ -49,18 +49,14 @@ export const DeployCompose = ({ composeId }: Props) => { composeStatus: "running", }) .then(async () => { - toast.success("Compose Deploying...."); + toast.success("Deploying Compose...."); await refetch(); await deploy({ composeId, - }) - .then(() => { - toast.success("Compose Deployed Succesfully"); - }) - .catch(() => { - toast.error("Error to deploy Compose"); - }); + }).catch(() => { + toast.error("Error to deploy Compose"); + }); await refetch(); }) diff --git a/components/dashboard/mariadb/general/deploy-mariadb.tsx b/components/dashboard/mariadb/general/deploy-mariadb.tsx index ac581d0d..e3162f00 100644 --- a/components/dashboard/mariadb/general/deploy-mariadb.tsx +++ b/components/dashboard/mariadb/general/deploy-mariadb.tsx @@ -50,17 +50,13 @@ export const DeployMariadb = ({ mariadbId }: Props) => { applicationStatus: "running", }) .then(async () => { - toast.success("Database Deploying...."); + toast.success("Deploying Database...."); await refetch(); await deploy({ mariadbId, - }) - .then(() => { - toast.success("Database Deployed Succesfully"); - }) - .catch(() => { - toast.error("Error to deploy Database"); - }); + }).catch(() => { + toast.error("Error to deploy Database"); + }); await refetch(); }) .catch((e) => { diff --git a/components/dashboard/mongo/general/deploy-mongo.tsx b/components/dashboard/mongo/general/deploy-mongo.tsx index 41a92f64..0ebda1ca 100644 --- a/components/dashboard/mongo/general/deploy-mongo.tsx +++ b/components/dashboard/mongo/general/deploy-mongo.tsx @@ -50,17 +50,13 @@ export const DeployMongo = ({ mongoId }: Props) => { applicationStatus: "running", }) .then(async () => { - toast.success("Database Deploying...."); + toast.success("Deploying Database...."); await refetch(); await deploy({ mongoId, - }) - .then(() => { - toast.success("Database Deployed Succesfully"); - }) - .catch(() => { - toast.error("Error to deploy Database"); - }); + }).catch(() => { + toast.error("Error to deploy Database"); + }); await refetch(); }) .catch((e) => { diff --git a/components/dashboard/mysql/general/deploy-mysql.tsx b/components/dashboard/mysql/general/deploy-mysql.tsx index 7074901f..a773feff 100644 --- a/components/dashboard/mysql/general/deploy-mysql.tsx +++ b/components/dashboard/mysql/general/deploy-mysql.tsx @@ -50,17 +50,13 @@ export const DeployMysql = ({ mysqlId }: Props) => { applicationStatus: "running", }) .then(async () => { - toast.success("Database Deploying...."); + toast.success("Deploying Database...."); await refetch(); await deploy({ mysqlId, - }) - .then(() => { - toast.success("Database Deployed Succesfully"); - }) - .catch(() => { - toast.error("Error to deploy Database"); - }); + }).catch(() => { + toast.error("Error to deploy Database"); + }); await refetch(); }) .catch((e) => { diff --git a/components/dashboard/postgres/general/deploy-postgres.tsx b/components/dashboard/postgres/general/deploy-postgres.tsx index 297df353..e329d9f8 100644 --- a/components/dashboard/postgres/general/deploy-postgres.tsx +++ b/components/dashboard/postgres/general/deploy-postgres.tsx @@ -50,17 +50,13 @@ export const DeployPostgres = ({ postgresId }: Props) => { applicationStatus: "running", }) .then(async () => { - toast.success("Database Deploying...."); + toast.success("Deploying Database...."); await refetch(); await deploy({ postgresId, - }) - .then(() => { - toast.success("Database Deployed Succesfully"); - }) - .catch(() => { - toast.error("Error to deploy Database"); - }); + }).catch(() => { + toast.error("Error to deploy Database"); + }); await refetch(); }) .catch((e) => { diff --git a/components/dashboard/redis/general/deploy-redis.tsx b/components/dashboard/redis/general/deploy-redis.tsx index a20ef1c3..131af030 100644 --- a/components/dashboard/redis/general/deploy-redis.tsx +++ b/components/dashboard/redis/general/deploy-redis.tsx @@ -50,17 +50,13 @@ export const DeployRedis = ({ redisId }: Props) => { applicationStatus: "running", }) .then(async () => { - toast.success("Database Deploying...."); + toast.success("Deploying Database..."); await refetch(); await deploy({ redisId, - }) - .then(() => { - toast.success("Database Deployed Succesfully"); - }) - .catch(() => { - toast.error("Error to deploy Database"); - }); + }).catch(() => { + toast.error("Error to deploy Database"); + }); await refetch(); }) .catch((e) => { diff --git a/package.json b/package.json index 54725581..f85c0af6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dokploy", - "version": "v0.2.0", + "version": "v0.2.1", "private": true, "license": "AGPL-3.0-only", "type": "module", diff --git a/server/api/routers/registry.ts b/server/api/routers/registry.ts index 63ffa213..ce83c796 100644 --- a/server/api/routers/registry.ts +++ b/server/api/routers/registry.ts @@ -17,7 +17,7 @@ import { adminProcedure, createTRPCRouter, protectedProcedure } from "../trpc"; import { TRPCError } from "@trpc/server"; import { manageRegistry } from "@/server/utils/traefik/registry"; import { initializeRegistry } from "@/server/setup/registry-setup"; -import { docker } from "@/server/constants"; +import { execAsync } from "@/server/utils/process/execAsync"; export const registryRouter = createTRPCRouter({ create: adminProcedure @@ -57,15 +57,11 @@ export const registryRouter = createTRPCRouter({ .input(apiTestRegistry) .mutation(async ({ input }) => { try { - const result = await docker.checkAuth({ - username: input.username, - password: input.password, - serveraddress: input.registryUrl, - }); - + const loginCommand = `echo ${input.password} | docker login ${input.registryUrl} --username ${input.username} --password-stdin`; + await execAsync(loginCommand); return true; } catch (error) { - console.log(error); + console.log("Error Registry:", error); return false; } }), diff --git a/server/api/services/registry.ts b/server/api/services/registry.ts index 48077d05..29c421b5 100644 --- a/server/api/services/registry.ts +++ b/server/api/services/registry.ts @@ -9,28 +9,35 @@ import { } from "@/server/utils/traefik/registry"; import { removeService } from "@/server/utils/docker/utils"; import { initializeRegistry } from "@/server/setup/registry-setup"; +import { execAsync } from "@/server/utils/process/execAsync"; export type Registry = typeof registry.$inferSelect; export const createRegistry = async (input: typeof apiCreateRegistry._type) => { const admin = await findAdmin(); - const newRegistry = await db - .insert(registry) - .values({ - ...input, - adminId: admin.adminId, - }) - .returning() - .then((value) => value[0]); + return await db.transaction(async (tx) => { + const newRegistry = await tx + .insert(registry) + .values({ + ...input, + adminId: admin.adminId, + }) + .returning() + .then((value) => value[0]); - if (!newRegistry) { - throw new TRPCError({ - code: "BAD_REQUEST", - message: "Error input: Inserting registry", - }); - } - return newRegistry; + if (!newRegistry) { + throw new TRPCError({ + code: "BAD_REQUEST", + message: "Error input: Inserting registry", + }); + } + + const loginCommand = `echo ${input.password} | docker login ${input.registryUrl} --username ${input.username} --password-stdin`; + await execAsync(loginCommand); + + return newRegistry; + }); }; export const removeRegistry = async (registryId: string) => { @@ -53,6 +60,8 @@ export const removeRegistry = async (registryId: string) => { await removeService("dokploy-registry"); } + await execAsync(`docker logout ${response.registryUrl}`); + return response; } catch (error) { throw new TRPCError({ diff --git a/server/utils/builders/compose.ts b/server/utils/builders/compose.ts index 034a2403..d3c90e9b 100644 --- a/server/utils/builders/compose.ts +++ b/server/utils/builders/compose.ts @@ -108,7 +108,12 @@ const createEnvFile = (compose: ComposeNested) => { join(COMPOSE_PATH, appName, "docker-compose.yml"); const envFilePath = join(dirname(composeFilePath), ".env"); - const envFileContent = prepareEnvironmentVariables(env).join("\n"); + let envContent = env || ""; + if (!envContent.includes("DOCKER_CONFIG")) { + envContent += "\nDOCKER_CONFIG=/root/.docker/config.json"; + } + + const envFileContent = prepareEnvironmentVariables(envContent).join("\n"); if (!existsSync(dirname(envFilePath))) { mkdirSync(dirname(envFilePath), { recursive: true });