diff --git a/README.md b/README.md index 1c8ef836..72620ef8 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ Dokploy includes multiple features to make your life easier. To get started, run the following command on a VPS: +Want to skip the installation process? [Try the Dokploy Cloud](https://app.dokploy.com). + ```bash curl -sSL https://dokploy.com/install.sh | sh ``` diff --git a/apps/dokploy/__test__/compose/domain/labels.test.ts b/apps/dokploy/__test__/compose/domain/labels.test.ts index 4123b287..8b5c2f9c 100644 --- a/apps/dokploy/__test__/compose/domain/labels.test.ts +++ b/apps/dokploy/__test__/compose/domain/labels.test.ts @@ -26,7 +26,6 @@ describe("createDomainLabels", () => { "traefik.http.routers.test-app-1-web.entrypoints=web", "traefik.http.services.test-app-1-web.loadbalancer.server.port=8080", "traefik.http.routers.test-app-1-web.service=test-app-1-web", - "traefik.http.routers.test-app-1-web.rule=PathPrefix(`/`)", ]); }); @@ -37,21 +36,21 @@ describe("createDomainLabels", () => { "traefik.http.routers.test-app-1-websecure.entrypoints=websecure", "traefik.http.services.test-app-1-websecure.loadbalancer.server.port=8080", "traefik.http.routers.test-app-1-websecure.service=test-app-1-websecure", - "traefik.http.routers.test-app-1-websecure.rule=PathPrefix(`/`)", ]); }); - it("shouldn't add the path prefix if is empty", async () => { + it("should add the path prefix if is different than / empty", async () => { const labels = await createDomainLabels( appName, { ...baseDomain, - path: "", + path: "/hello", }, "websecure", ); + expect(labels).toEqual([ - "traefik.http.routers.test-app-1-websecure.rule=Host(`example.com`)", + "traefik.http.routers.test-app-1-websecure.rule=Host(`example.com`) && PathPrefix(`/hello`)", "traefik.http.routers.test-app-1-websecure.entrypoints=websecure", "traefik.http.services.test-app-1-websecure.loadbalancer.server.port=8080", "traefik.http.routers.test-app-1-websecure.service=test-app-1-websecure", diff --git a/apps/dokploy/components/dashboard/settings/git/github/add-github-provider.tsx b/apps/dokploy/components/dashboard/settings/git/github/add-github-provider.tsx index 58cc8723..a04a166b 100644 --- a/apps/dokploy/components/dashboard/settings/git/github/add-github-provider.tsx +++ b/apps/dokploy/components/dashboard/settings/git/github/add-github-provider.tsx @@ -53,7 +53,7 @@ export const AddGithubProvider = () => { diff --git a/apps/dokploy/components/icons/data-tools-icons.tsx b/apps/dokploy/components/icons/data-tools-icons.tsx index 43c2b371..116f5d8a 100644 --- a/apps/dokploy/components/icons/data-tools-icons.tsx +++ b/apps/dokploy/components/icons/data-tools-icons.tsx @@ -161,29 +161,27 @@ export const GitlabIcon = ({ className }: Props) => { return ( ); @@ -200,7 +198,7 @@ export const GithubIcon = ({ className }: Props) => { > @@ -209,30 +207,34 @@ export const GithubIcon = ({ className }: Props) => { export const BitbucketIcon = ({ className }: Props) => { return ( - + + + - - + + - - ); }; diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json index df8e7c25..24a8fa47 100644 --- a/apps/dokploy/package.json +++ b/apps/dokploy/package.json @@ -1,6 +1,6 @@ { "name": "dokploy", - "version": "v0.10.10", + "version": "v0.11.1", "private": true, "license": "Apache-2.0", "type": "module", @@ -11,7 +11,7 @@ "build-next": "next build", "setup": "tsx -r dotenv/config setup.ts && sleep 5 && pnpm run migration:run", "reset-password": "node -r dotenv/config dist/reset-password.mjs", - "dev": "TURBOPACK=1 tsx -r dotenv/config ./server/server.ts --project tsconfig.server.json ", + "dev": "tsx -r dotenv/config ./server/server.ts --project tsconfig.server.json ", "studio": "drizzle-kit studio --config ./server/db/drizzle.config.ts", "migration:generate": "drizzle-kit generate --config ./server/db/drizzle.config.ts", "migration:run": "tsx -r dotenv/config migration.ts", diff --git a/apps/dokploy/server/server.ts b/apps/dokploy/server/server.ts index b65446f8..bf111233 100644 --- a/apps/dokploy/server/server.ts +++ b/apps/dokploy/server/server.ts @@ -24,7 +24,7 @@ import { setupTerminalWebSocketServer } from "./wss/terminal"; config({ path: ".env" }); const PORT = Number.parseInt(process.env.PORT || "3000", 10); const dev = process.env.NODE_ENV !== "production"; -const app = next({ dev, turbopack: dev }); +const app = next({ dev }); const handle = app.getRequestHandler(); void app.prepare().then(async () => { try { diff --git a/packages/server/src/services/mongo.ts b/packages/server/src/services/mongo.ts index 1360372d..b87ec4da 100644 --- a/packages/server/src/services/mongo.ts +++ b/packages/server/src/services/mongo.ts @@ -14,7 +14,7 @@ export type Mongo = typeof mongo.$inferSelect; export const createMongo = async (input: typeof apiCreateMongo._type) => { input.appName = - `${input.appName}-${generatePassword(6)}` || generateAppName("postgres"); + `${input.appName}-${generatePassword(6)}` || generateAppName("mongo"); if (input.appName) { const valid = await validUniqueServerAppName(input.appName); @@ -72,12 +72,12 @@ export const findMongoById = async (mongoId: string) => { export const updateMongoById = async ( mongoId: string, - postgresData: Partial, + mongoData: Partial, ) => { const result = await db .update(mongo) .set({ - ...postgresData, + ...mongoData, }) .where(eq(mongo.mongoId, mongoId)) .returning(); diff --git a/packages/server/src/utils/docker/domain.ts b/packages/server/src/utils/docker/domain.ts index a065f31c..69bfa222 100644 --- a/packages/server/src/utils/docker/domain.ts +++ b/packages/server/src/utils/docker/domain.ts @@ -259,21 +259,15 @@ export const createDomainLabels = async ( domain: Domain, entrypoint: "web" | "websecure", ) => { - const { host, port, https, uniqueConfigKey, certificateType } = domain; + const { host, port, https, uniqueConfigKey, certificateType, path } = domain; const routerName = `${appName}-${uniqueConfigKey}-${entrypoint}`; const labels = [ - `traefik.http.routers.${routerName}.rule=Host(\`${host}\`)`, + `traefik.http.routers.${routerName}.rule=Host(\`${host}\`)${path && path !== "/" ? ` && PathPrefix(\`${path}\`)` : ""}`, `traefik.http.routers.${routerName}.entrypoints=${entrypoint}`, `traefik.http.services.${routerName}.loadbalancer.server.port=${port}`, `traefik.http.routers.${routerName}.service=${routerName}`, ]; - if (domain.path) { - labels.push( - `traefik.http.routers.${routerName}.rule=PathPrefix(\`${domain.path}\`)`, - ); - } - if (entrypoint === "web" && https) { labels.push( `traefik.http.routers.${routerName}.middlewares=redirect-to-https@file`,