diff --git a/.github/sponsors/mandarin.png b/.github/sponsors/mandarin.png new file mode 100644 index 000000000..f76512920 Binary files /dev/null and b/.github/sponsors/mandarin.png differ diff --git a/README.md b/README.md index 2e784812c..1c8ef8365 100644 --- a/README.md +++ b/README.md @@ -60,12 +60,15 @@ For detailed documentation, visit [docs.dokploy.com](https://docs.dokploy.com). ### Hero Sponsors 🎖
### Premium Supporters 🥇 diff --git a/apps/dokploy/__test__/compose/domain/labels.test.ts b/apps/dokploy/__test__/compose/domain/labels.test.ts index 5076a2042..4123b2877 100644 --- a/apps/dokploy/__test__/compose/domain/labels.test.ts +++ b/apps/dokploy/__test__/compose/domain/labels.test.ts @@ -26,11 +26,30 @@ 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(`/`)", ]); }); it("should create labels for websecure entrypoint", async () => { const labels = await createDomainLabels(appName, baseDomain, "websecure"); + expect(labels).toEqual([ + "traefik.http.routers.test-app-1-websecure.rule=Host(`example.com`)", + "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 () => { + const labels = await createDomainLabels( + appName, + { + ...baseDomain, + path: "", + }, + "websecure", + ); expect(labels).toEqual([ "traefik.http.routers.test-app-1-websecure.rule=Host(`example.com`)", "traefik.http.routers.test-app-1-websecure.entrypoints=websecure", diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx index 17edaa991..78ad12363 100644 --- a/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx @@ -23,29 +23,27 @@ export const ToggleDockerCleanup = ({ serverId }: Props) => { const enabled = data?.enableDockerCleanup || server?.enableDockerCleanup; const { mutateAsync } = api.settings.updateDockerCleanup.useMutation(); + + const handleToggle = async (checked: boolean) => { + try { + await mutateAsync({ + enableDockerCleanup: checked, + serverId: serverId, + }); + if (serverId) { + await refetchServer(); + } else { + await refetch(); + } + toast.success("Docker Cleanup updated"); + } catch (error) { + toast.error("Docker Cleanup Error"); + } + }; + return (