mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge branch 'Dokploy:canary' into feature/gpu-support-blender-template
This commit is contained in:
BIN
.github/sponsors/mandarin.png
vendored
Normal file
BIN
.github/sponsors/mandarin.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
@@ -60,12 +60,15 @@ For detailed documentation, visit [docs.dokploy.com](https://docs.dokploy.com).
|
|||||||
### Hero Sponsors 🎖
|
### Hero Sponsors 🎖
|
||||||
|
|
||||||
<div style="display: flex; align-items: center; gap: 20px;">
|
<div style="display: flex; align-items: center; gap: 20px;">
|
||||||
<a href="https://www.hostinger.com/vps-hosting?ref=dokploy" target="_blank" style="display: inline-block;">
|
<a href="https://www.hostinger.com/vps-hosting?ref=dokploy" target="_blank" style="display: inline-block; margin-right: 10px;">
|
||||||
<img src=".github/sponsors/hostinger.jpg" alt="Hostinger" height="50"/>
|
<img src=".github/sponsors/hostinger.jpg" alt="Hostinger" height="50"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://www.lxaer.com/?ref=dokploy" target="_blank" style="display: inline-block;">
|
<a href="https://www.lxaer.com/?ref=dokploy" target="_blank" style="display: inline-block; margin-right: 10px;">
|
||||||
<img src=".github/sponsors/lxaer.png" alt="LX Aer" height="50"/>
|
<img src=".github/sponsors/lxaer.png" alt="LX Aer" height="50"/>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://mandarin3d.com/?ref=dokploy" target="_blank" style="display: inline-block;">
|
||||||
|
<img src=".github/sponsors/mandarin.png" alt="Mandarin" height="50"/>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### Premium Supporters 🥇
|
### Premium Supporters 🥇
|
||||||
|
|||||||
@@ -26,11 +26,30 @@ describe("createDomainLabels", () => {
|
|||||||
"traefik.http.routers.test-app-1-web.entrypoints=web",
|
"traefik.http.routers.test-app-1-web.entrypoints=web",
|
||||||
"traefik.http.services.test-app-1-web.loadbalancer.server.port=8080",
|
"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.service=test-app-1-web",
|
||||||
|
"traefik.http.routers.test-app-1-web.rule=PathPrefix(`/`)",
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should create labels for websecure entrypoint", async () => {
|
it("should create labels for websecure entrypoint", async () => {
|
||||||
const labels = await createDomainLabels(appName, baseDomain, "websecure");
|
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([
|
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`)",
|
||||||
"traefik.http.routers.test-app-1-websecure.entrypoints=websecure",
|
"traefik.http.routers.test-app-1-websecure.entrypoints=websecure",
|
||||||
|
|||||||
@@ -23,29 +23,27 @@ export const ToggleDockerCleanup = ({ serverId }: Props) => {
|
|||||||
const enabled = data?.enableDockerCleanup || server?.enableDockerCleanup;
|
const enabled = data?.enableDockerCleanup || server?.enableDockerCleanup;
|
||||||
|
|
||||||
const { mutateAsync } = api.settings.updateDockerCleanup.useMutation();
|
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 (
|
return (
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<Switch
|
<Switch checked={!!enabled} onCheckedChange={handleToggle} />
|
||||||
checked={enabled}
|
|
||||||
onCheckedChange={async (e) => {
|
|
||||||
await mutateAsync({
|
|
||||||
enableDockerCleanup: e,
|
|
||||||
serverId: serverId,
|
|
||||||
})
|
|
||||||
.then(async () => {
|
|
||||||
toast.success("Docker Cleanup Enabled");
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
toast.error("Docker Cleanup Error");
|
|
||||||
});
|
|
||||||
|
|
||||||
if (serverId) {
|
|
||||||
refetchServer();
|
|
||||||
} else {
|
|
||||||
refetch();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Label className="text-primary">Daily Docker Cleanup</Label>
|
<Label className="text-primary">Daily Docker Cleanup</Label>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ export const createDomainLabels = async (
|
|||||||
`traefik.http.routers.${routerName}.service=${routerName}`,
|
`traefik.http.routers.${routerName}.service=${routerName}`,
|
||||||
];
|
];
|
||||||
|
|
||||||
if (domain.path && domain.path.length > 0 && domain.path !== "/") {
|
if (domain.path) {
|
||||||
labels.push(
|
labels.push(
|
||||||
`traefik.http.routers.${routerName}.rule=PathPrefix(\`${domain.path}\`)`,
|
`traefik.http.routers.${routerName}.rule=PathPrefix(\`${domain.path}\`)`,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user