diff --git a/apps/dokploy/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx b/apps/dokploy/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx
index 6750527d..9b71a042 100644
--- a/apps/dokploy/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/cluster/modify-swarm-settings.tsx
@@ -259,7 +259,7 @@ export const AddSwarmSettings = ({ applicationId }: Props) => {
refetch();
})
.catch(() => {
- toast.error("Error to update the swarm settings");
+ toast.error("Error updating the swarm settings");
});
};
return (
diff --git a/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx b/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx
index d8d32e19..cf7314cf 100644
--- a/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx
@@ -94,7 +94,7 @@ export const ShowClusterSettings = ({ applicationId }: Props) => {
});
})
.catch(() => {
- toast.error("Error to update the command");
+ toast.error("Error updating the command");
});
};
diff --git a/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx b/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx
index 979660bc..f9e70b42 100644
--- a/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/general/add-command.tsx
@@ -71,7 +71,7 @@ export const AddCommand = ({ applicationId }: Props) => {
});
})
.catch(() => {
- toast.error("Error to update the command");
+ toast.error("Error updating the command");
});
};
diff --git a/apps/dokploy/components/dashboard/application/advanced/ports/add-port.tsx b/apps/dokploy/components/dashboard/application/advanced/ports/add-port.tsx
index 1b613704..1fc34cac 100644
--- a/apps/dokploy/components/dashboard/application/advanced/ports/add-port.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/ports/add-port.tsx
@@ -86,7 +86,7 @@ export const AddPort = ({
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to create the port");
+ toast.error("Error creating the port");
});
};
diff --git a/apps/dokploy/components/dashboard/application/advanced/ports/delete-port.tsx b/apps/dokploy/components/dashboard/application/advanced/ports/delete-port.tsx
index cc2c7776..e1723f6e 100644
--- a/apps/dokploy/components/dashboard/application/advanced/ports/delete-port.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/ports/delete-port.tsx
@@ -47,10 +47,10 @@ export const DeletePort = ({ portId }: Props) => {
applicationId: data?.applicationId,
});
- toast.success("Port delete succesfully");
+ toast.success("Port delete successfully");
})
.catch(() => {
- toast.error("Error to delete the port");
+ toast.error("Error deleting the port");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/application/advanced/ports/update-port.tsx b/apps/dokploy/components/dashboard/application/advanced/ports/update-port.tsx
index a9f7f32d..e37a3c5b 100644
--- a/apps/dokploy/components/dashboard/application/advanced/ports/update-port.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/ports/update-port.tsx
@@ -93,7 +93,7 @@ export const UpdatePort = ({ portId }: Props) => {
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update the port");
+ toast.error("Error updating the port");
});
};
diff --git a/apps/dokploy/components/dashboard/application/advanced/redirects/add-redirect.tsx b/apps/dokploy/components/dashboard/application/advanced/redirects/add-redirect.tsx
index 8ce547a2..abeb2108 100644
--- a/apps/dokploy/components/dashboard/application/advanced/redirects/add-redirect.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/redirects/add-redirect.tsx
@@ -124,7 +124,7 @@ export const AddRedirect = ({
onDialogToggle(false);
})
.catch(() => {
- toast.error("Error to create the redirect");
+ toast.error("Error creating the redirect");
});
};
diff --git a/apps/dokploy/components/dashboard/application/advanced/redirects/delete-redirect.tsx b/apps/dokploy/components/dashboard/application/advanced/redirects/delete-redirect.tsx
index 08d1f3e0..49f289b2 100644
--- a/apps/dokploy/components/dashboard/application/advanced/redirects/delete-redirect.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/redirects/delete-redirect.tsx
@@ -50,10 +50,10 @@ export const DeleteRedirect = ({ redirectId }: Props) => {
utils.application.readTraefikConfig.invalidate({
applicationId: data?.applicationId,
});
- toast.success("Redirect delete succesfully");
+ toast.success("Redirect delete successfully");
})
.catch(() => {
- toast.error("Error to delete the redirect");
+ toast.error("Error deleting the redirect");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/application/advanced/redirects/update-redirect.tsx b/apps/dokploy/components/dashboard/application/advanced/redirects/update-redirect.tsx
index 52ff310d..c4125846 100644
--- a/apps/dokploy/components/dashboard/application/advanced/redirects/update-redirect.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/redirects/update-redirect.tsx
@@ -88,7 +88,7 @@ export const UpdateRedirect = ({ redirectId }: Props) => {
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update the redirect");
+ toast.error("Error updating the redirect");
});
};
diff --git a/apps/dokploy/components/dashboard/application/advanced/security/add-security.tsx b/apps/dokploy/components/dashboard/application/advanced/security/add-security.tsx
index aeaebb92..56a1a6a4 100644
--- a/apps/dokploy/components/dashboard/application/advanced/security/add-security.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/security/add-security.tsx
@@ -75,7 +75,7 @@ export const AddSecurity = ({
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to create the security");
+ toast.error("Error creating security");
});
};
diff --git a/apps/dokploy/components/dashboard/application/advanced/security/delete-security.tsx b/apps/dokploy/components/dashboard/application/advanced/security/delete-security.tsx
index 1a63c234..b44b2ff8 100644
--- a/apps/dokploy/components/dashboard/application/advanced/security/delete-security.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/security/delete-security.tsx
@@ -50,10 +50,10 @@ export const DeleteSecurity = ({ securityId }: Props) => {
utils.application.readTraefikConfig.invalidate({
applicationId: data?.applicationId,
});
- toast.success("Security delete succesfully");
+ toast.success("Security delete successfully");
})
.catch(() => {
- toast.error("Error to delete the security");
+ toast.error("Error deleting the security");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/application/advanced/security/update-security.tsx b/apps/dokploy/components/dashboard/application/advanced/security/update-security.tsx
index 1e5af95f..cec1db0d 100644
--- a/apps/dokploy/components/dashboard/application/advanced/security/update-security.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/security/update-security.tsx
@@ -83,7 +83,7 @@ export const UpdateSecurity = ({ securityId }: Props) => {
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update the security");
+ toast.error("Error updating the security");
});
};
diff --git a/apps/dokploy/components/dashboard/application/advanced/show-application-advanced-settings.tsx b/apps/dokploy/components/dashboard/application/advanced/show-application-advanced-settings.tsx
index e77be2d1..c603ea32 100644
--- a/apps/dokploy/components/dashboard/application/advanced/show-application-advanced-settings.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/show-application-advanced-settings.tsx
@@ -22,6 +22,13 @@ import React, { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
+} from "@/components/ui/tooltip";
+import { InfoIcon } from "lucide-react";
const addResourcesApplication = z.object({
memoryReservation: z.number().nullable().optional(),
@@ -72,7 +79,7 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to Update the resources");
+ toast.error("Error updating the resources");
});
};
return (
@@ -101,10 +108,25 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
name="memoryReservation"
render={({ field }) => (
- Memory Reservation
+
+
Memory Reservation
+
+
+
+
+
+
+
+ Memory soft limit in bytes. Example: 256MB =
+ 268435456 bytes
+
+
+
+
+
{
@@ -120,7 +142,6 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
}}
/>
-
)}
@@ -132,10 +153,25 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
render={({ field }) => {
return (
- Memory Limit
+
+
Memory Limit
+
+
+
+
+
+
+
+ Memory hard limit in bytes. Example: 1GB =
+ 1073741824 bytes
+
+
+
+
+
{
@@ -163,21 +199,36 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
render={({ field }) => {
return (
- Cpu Limit
+
+
CPU Limit
+
+
+
+
+
+
+
+ CPU quota in units of 10^-9 CPUs. Example: 2
+ CPUs = 2000000000
+
+
+
+
+
{
const value = e.target.value;
- if (
- value === "" ||
- /^[0-9]*\.?[0-9]*$/.test(value)
- ) {
- const float = Number.parseFloat(value);
- field.onChange(float);
+ if (value === "") {
+ field.onChange(null);
+ } else {
+ const number = Number.parseInt(value, 10);
+ if (!Number.isNaN(number)) {
+ field.onChange(number);
+ }
}
}}
/>
@@ -193,21 +244,36 @@ export const ShowApplicationResources = ({ applicationId }: Props) => {
render={({ field }) => {
return (
- Cpu Reservation
+
+
CPU Reservation
+
+
+
+
+
+
+
+ CPU shares (relative weight). Example: 1 CPU =
+ 1000000000
+
+
+
+
+
{
const value = e.target.value;
- if (
- value === "" ||
- /^[0-9]*\.?[0-9]*$/.test(value)
- ) {
- const float = Number.parseFloat(value);
- field.onChange(float);
+ if (value === "") {
+ field.onChange(null);
+ } else {
+ const number = Number.parseInt(value, 10);
+ if (!Number.isNaN(number)) {
+ field.onChange(number);
+ }
}
}}
/>
diff --git a/apps/dokploy/components/dashboard/application/advanced/traefik/update-traefik-config.tsx b/apps/dokploy/components/dashboard/application/advanced/traefik/update-traefik-config.tsx
index 2c2437a1..f563f1ab 100644
--- a/apps/dokploy/components/dashboard/application/advanced/traefik/update-traefik-config.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/traefik/update-traefik-config.tsx
@@ -105,7 +105,7 @@ export const UpdateTraefikConfig = ({ applicationId }: Props) => {
form.reset();
})
.catch(() => {
- toast.error("Error to update the traefik config");
+ toast.error("Error updating the Traefik config");
});
};
diff --git a/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx b/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx
index 5c6b95ca..718f98b7 100644
--- a/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx
@@ -107,7 +107,7 @@ export const AddVolumes = ({
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to create the Bind mount");
+ toast.error("Error creating the Bind mount");
});
} else if (data.type === "volume") {
await mutateAsync({
@@ -122,7 +122,7 @@ export const AddVolumes = ({
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to create the Volume mount");
+ toast.error("Error creating the Volume mount");
});
} else if (data.type === "file") {
await mutateAsync({
@@ -138,7 +138,7 @@ export const AddVolumes = ({
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to create the File mount");
+ toast.error("Error creating the File mount");
});
}
diff --git a/apps/dokploy/components/dashboard/application/advanced/volumes/delete-volume.tsx b/apps/dokploy/components/dashboard/application/advanced/volumes/delete-volume.tsx
index 020a6c36..4945bb4b 100644
--- a/apps/dokploy/components/dashboard/application/advanced/volumes/delete-volume.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/volumes/delete-volume.tsx
@@ -45,10 +45,10 @@ export const DeleteVolume = ({ mountId, refetch }: Props) => {
})
.then(() => {
refetch();
- toast.success("Mount deleted succesfully");
+ toast.success("Mount deleted successfully");
})
.catch(() => {
- toast.error("Error to delete the mount");
+ toast.error("Error deleting the mount");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx b/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx
index 80cc97ad..55ea2120 100644
--- a/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx
+++ b/apps/dokploy/components/dashboard/application/advanced/volumes/update-volume.tsx
@@ -139,7 +139,7 @@ export const UpdateVolume = ({
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update the Bind mount");
+ toast.error("Error updating the Bind mount");
});
} else if (data.type === "volume") {
await mutateAsync({
@@ -153,7 +153,7 @@ export const UpdateVolume = ({
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update the Volume mount");
+ toast.error("Error updating the Volume mount");
});
} else if (data.type === "file") {
await mutateAsync({
@@ -168,7 +168,7 @@ export const UpdateVolume = ({
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update the File mount");
+ toast.error("Error updating the File mount");
});
}
refetch();
diff --git a/apps/dokploy/components/dashboard/application/build/show.tsx b/apps/dokploy/components/dashboard/application/build/show.tsx
index edfb38ae..ad83f456 100644
--- a/apps/dokploy/components/dashboard/application/build/show.tsx
+++ b/apps/dokploy/components/dashboard/application/build/show.tsx
@@ -126,7 +126,7 @@ export const ShowBuildChooseForm = ({ applicationId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the build type");
+ toast.error("Error saving the build type");
});
};
diff --git a/apps/dokploy/components/dashboard/application/deployments/refresh-token.tsx b/apps/dokploy/components/dashboard/application/deployments/refresh-token.tsx
index 88d5beee..c268e6d5 100644
--- a/apps/dokploy/components/dashboard/application/deployments/refresh-token.tsx
+++ b/apps/dokploy/components/dashboard/application/deployments/refresh-token.tsx
@@ -47,7 +47,7 @@ export const RefreshToken = ({ applicationId }: Props) => {
toast.success("Refresh updated");
})
.catch(() => {
- toast.error("Error to update the refresh token");
+ toast.error("Error updating the refresh token");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/application/domains/add-domain.tsx b/apps/dokploy/components/dashboard/application/domains/add-domain.tsx
index 38180114..22eaf1d3 100644
--- a/apps/dokploy/components/dashboard/application/domains/add-domain.tsx
+++ b/apps/dokploy/components/dashboard/application/domains/add-domain.tsx
@@ -105,8 +105,8 @@ export const AddDomain = ({
const dictionary = {
success: domainId ? "Domain Updated" : "Domain Created",
error: domainId
- ? "Error to update the domain"
- : "Error to create the domain",
+ ? "Error updating the domain"
+ : "Error creating the domain",
submit: domainId ? "Update" : "Create",
dialogDescription: domainId
? "In this section you can edit a domain"
diff --git a/apps/dokploy/components/dashboard/application/domains/delete-domain.tsx b/apps/dokploy/components/dashboard/application/domains/delete-domain.tsx
index 5933a99a..3d4425df 100644
--- a/apps/dokploy/components/dashboard/application/domains/delete-domain.tsx
+++ b/apps/dokploy/components/dashboard/application/domains/delete-domain.tsx
@@ -57,10 +57,10 @@ export const DeleteDomain = ({ domainId }: Props) => {
});
}
- toast.success("Domain delete succesfully");
+ toast.success("Domain delete successfully");
})
.catch(() => {
- toast.error("Error to delete Domain");
+ toast.error("Error deleting the Domain");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/application/environment/show.tsx b/apps/dokploy/components/dashboard/application/environment/show.tsx
index c7b8d4bb..ec555804 100644
--- a/apps/dokploy/components/dashboard/application/environment/show.tsx
+++ b/apps/dokploy/components/dashboard/application/environment/show.tsx
@@ -51,7 +51,7 @@ export const ShowEnvironment = ({ applicationId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to add environment");
+ toast.error("Error adding environment");
});
};
diff --git a/apps/dokploy/components/dashboard/application/general/deploy-application.tsx b/apps/dokploy/components/dashboard/application/general/deploy-application.tsx
index 252894dd..c1ab8457 100644
--- a/apps/dokploy/components/dashboard/application/general/deploy-application.tsx
+++ b/apps/dokploy/components/dashboard/application/general/deploy-application.tsx
@@ -51,7 +51,7 @@ export const DeployApplication = ({ applicationId }: Props) => {
applicationId,
})
.then(async () => {
- toast.success("Application deployed succesfully");
+ toast.success("Application deployed successfully");
await refetch();
router.push(
`/dashboard/project/${data?.projectId}/services/application/${applicationId}?tab=deployments`,
@@ -59,7 +59,7 @@ export const DeployApplication = ({ applicationId }: Props) => {
})
.catch(() => {
- toast.error("Error to deploy Application");
+ toast.error("Error deploying the Application");
});
await refetch();
diff --git a/apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx b/apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx
index d6dfa20e..a487452b 100644
--- a/apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx
+++ b/apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx
@@ -137,7 +137,7 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the Bitbucket provider");
+ toast.error("Error saving the Bitbucket provider");
});
};
diff --git a/apps/dokploy/components/dashboard/application/general/generic/save-docker-provider.tsx b/apps/dokploy/components/dashboard/application/general/generic/save-docker-provider.tsx
index b4e33719..fcc4f824 100644
--- a/apps/dokploy/components/dashboard/application/general/generic/save-docker-provider.tsx
+++ b/apps/dokploy/components/dashboard/application/general/generic/save-docker-provider.tsx
@@ -68,7 +68,7 @@ export const SaveDockerProvider = ({ applicationId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the Docker provider");
+ toast.error("Error saving the Docker provider");
});
};
diff --git a/apps/dokploy/components/dashboard/application/general/generic/save-drag-n-drop.tsx b/apps/dokploy/components/dashboard/application/general/generic/save-drag-n-drop.tsx
index 4ed9df16..3732860d 100644
--- a/apps/dokploy/components/dashboard/application/general/generic/save-drag-n-drop.tsx
+++ b/apps/dokploy/components/dashboard/application/general/generic/save-drag-n-drop.tsx
@@ -56,7 +56,7 @@ export const SaveDragNDrop = ({ applicationId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the deployment");
+ toast.error("Error saving the deployment");
});
};
diff --git a/apps/dokploy/components/dashboard/application/general/generic/save-git-provider.tsx b/apps/dokploy/components/dashboard/application/general/generic/save-git-provider.tsx
index 58fd1973..218e004d 100644
--- a/apps/dokploy/components/dashboard/application/general/generic/save-git-provider.tsx
+++ b/apps/dokploy/components/dashboard/application/general/generic/save-git-provider.tsx
@@ -84,7 +84,7 @@ export const SaveGitProvider = ({ applicationId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the Git provider");
+ toast.error("Error saving the Git provider");
});
};
diff --git a/apps/dokploy/components/dashboard/application/general/generic/save-github-provider.tsx b/apps/dokploy/components/dashboard/application/general/generic/save-github-provider.tsx
index 5c432e6a..f5da9ceb 100644
--- a/apps/dokploy/components/dashboard/application/general/generic/save-github-provider.tsx
+++ b/apps/dokploy/components/dashboard/application/general/generic/save-github-provider.tsx
@@ -131,7 +131,7 @@ export const SaveGithubProvider = ({ applicationId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the github provider");
+ toast.error("Error saving the github provider");
});
};
diff --git a/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx b/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx
index 2d498bfd..d190180e 100644
--- a/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx
+++ b/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx
@@ -144,7 +144,7 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the gitlab provider");
+ toast.error("Error saving the gitlab provider");
});
};
diff --git a/apps/dokploy/components/dashboard/application/general/reset-application.tsx b/apps/dokploy/components/dashboard/application/general/reset-application.tsx
index cc338658..5be2a185 100644
--- a/apps/dokploy/components/dashboard/application/general/reset-application.tsx
+++ b/apps/dokploy/components/dashboard/application/general/reset-application.tsx
@@ -56,7 +56,7 @@ export const ResetApplication = ({ applicationId, appName }: Props) => {
toast.success("Service Reloaded");
})
.catch(() => {
- toast.error("Error to reload the service");
+ toast.error("Error reloading the service");
});
await refetch();
}}
diff --git a/apps/dokploy/components/dashboard/application/general/show.tsx b/apps/dokploy/components/dashboard/application/general/show.tsx
index 65c99e9b..46f185d5 100644
--- a/apps/dokploy/components/dashboard/application/general/show.tsx
+++ b/apps/dokploy/components/dashboard/application/general/show.tsx
@@ -69,7 +69,7 @@ export const ShowGeneralApplication = ({ applicationId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to update Auto Deploy");
+ toast.error("Error updating Auto Deploy");
});
}}
className="flex flex-row gap-2 items-center"
diff --git a/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx b/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx
index 875a93d4..3a33bbed 100644
--- a/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx
+++ b/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx
@@ -105,8 +105,8 @@ export const AddPreviewDomain = ({
const dictionary = {
success: domainId ? "Domain Updated" : "Domain Created",
error: domainId
- ? "Error to update the domain"
- : "Error to create the domain",
+ ? "Error updating the domain"
+ : "Error creating the domain",
submit: domainId ? "Update" : "Create",
dialogDescription: domainId
? "In this section you can edit a domain"
diff --git a/apps/dokploy/components/dashboard/application/rebuild-application.tsx b/apps/dokploy/components/dashboard/application/rebuild-application.tsx
index 0284ab8f..66ed3397 100644
--- a/apps/dokploy/components/dashboard/application/rebuild-application.tsx
+++ b/apps/dokploy/components/dashboard/application/rebuild-application.tsx
@@ -63,7 +63,7 @@ export const RedbuildApplication = ({ applicationId }: Props) => {
});
})
.catch(() => {
- toast.error("Error to rebuild the application");
+ toast.error("Error rebuilding the application");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/application/start-application.tsx b/apps/dokploy/components/dashboard/application/start-application.tsx
index d65997ed..9a65397b 100644
--- a/apps/dokploy/components/dashboard/application/start-application.tsx
+++ b/apps/dokploy/components/dashboard/application/start-application.tsx
@@ -49,10 +49,10 @@ export const StartApplication = ({ applicationId }: Props) => {
await utils.application.one.invalidate({
applicationId,
});
- toast.success("Application started succesfully");
+ toast.success("Application started successfully");
})
.catch(() => {
- toast.error("Error to start the Application");
+ toast.error("Error starting the Application");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/application/stop-application.tsx b/apps/dokploy/components/dashboard/application/stop-application.tsx
index 5eb873f4..ea052fab 100644
--- a/apps/dokploy/components/dashboard/application/stop-application.tsx
+++ b/apps/dokploy/components/dashboard/application/stop-application.tsx
@@ -49,10 +49,10 @@ export const StopApplication = ({ applicationId }: Props) => {
await utils.application.one.invalidate({
applicationId,
});
- toast.success("Application stopped succesfully");
+ toast.success("Application stopped successfully");
})
.catch(() => {
- toast.error("Error to stop the Application");
+ toast.error("Error stopping the Application");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/application/update-application.tsx b/apps/dokploy/components/dashboard/application/update-application.tsx
index f40a0020..8f8b63fe 100644
--- a/apps/dokploy/components/dashboard/application/update-application.tsx
+++ b/apps/dokploy/components/dashboard/application/update-application.tsx
@@ -76,14 +76,14 @@ export const UpdateApplication = ({ applicationId }: Props) => {
description: formData.description || "",
})
.then(() => {
- toast.success("Application updated succesfully");
+ toast.success("Application updated successfully");
utils.application.one.invalidate({
applicationId: applicationId,
});
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update the application");
+ toast.error("Error updating the Application");
})
.finally(() => {});
};
diff --git a/apps/dokploy/components/dashboard/compose/advanced/add-command.tsx b/apps/dokploy/components/dashboard/compose/advanced/add-command.tsx
index 6d1b455f..1bbd3820 100644
--- a/apps/dokploy/components/dashboard/compose/advanced/add-command.tsx
+++ b/apps/dokploy/components/dashboard/compose/advanced/add-command.tsx
@@ -82,7 +82,7 @@ export const AddCommandCompose = ({ composeId }: Props) => {
});
})
.catch(() => {
- toast.error("Error to update the command");
+ toast.error("Error updating the command");
});
};
diff --git a/apps/dokploy/components/dashboard/compose/deployments/refresh-token-compose.tsx b/apps/dokploy/components/dashboard/compose/deployments/refresh-token-compose.tsx
index 66d690e7..95fafaab 100644
--- a/apps/dokploy/components/dashboard/compose/deployments/refresh-token-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/deployments/refresh-token-compose.tsx
@@ -47,7 +47,7 @@ export const RefreshTokenCompose = ({ composeId }: Props) => {
toast.success("Refresh Token updated");
})
.catch(() => {
- toast.error("Error to update the refresh token");
+ toast.error("Error updating the refresh token");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/compose/domains/add-domain.tsx b/apps/dokploy/components/dashboard/compose/domains/add-domain.tsx
index 6ea38237..b9ae9a2e 100644
--- a/apps/dokploy/components/dashboard/compose/domains/add-domain.tsx
+++ b/apps/dokploy/components/dashboard/compose/domains/add-domain.tsx
@@ -127,8 +127,8 @@ export const AddDomainCompose = ({
const dictionary = {
success: domainId ? "Domain Updated" : "Domain Created",
error: domainId
- ? "Error to update the domain"
- : "Error to create the domain",
+ ? "Error updating the domain"
+ : "Error creating the domain",
submit: domainId ? "Update" : "Create",
dialogDescription: domainId
? "In this section you can edit a domain"
diff --git a/apps/dokploy/components/dashboard/compose/enviroment/show.tsx b/apps/dokploy/components/dashboard/compose/environment/show.tsx
similarity index 98%
rename from apps/dokploy/components/dashboard/compose/enviroment/show.tsx
rename to apps/dokploy/components/dashboard/compose/environment/show.tsx
index 4e9b2dfd..8fa1f444 100644
--- a/apps/dokploy/components/dashboard/compose/enviroment/show.tsx
+++ b/apps/dokploy/components/dashboard/compose/environment/show.tsx
@@ -70,7 +70,7 @@ export const ShowEnvironmentCompose = ({ composeId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to add environment");
+ toast.error("Error adding environment");
});
};
diff --git a/apps/dokploy/components/dashboard/compose/general/actions.tsx b/apps/dokploy/components/dashboard/compose/general/actions.tsx
index 43966966..215e7e42 100644
--- a/apps/dokploy/components/dashboard/compose/general/actions.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/actions.tsx
@@ -83,7 +83,7 @@ export const ComposeActions = ({ composeId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to update Auto Deploy");
+ toast.error("Error updating Auto Deploy");
});
}}
className="flex flex-row gap-2 items-center"
diff --git a/apps/dokploy/components/dashboard/compose/general/compose-file-editor.tsx b/apps/dokploy/components/dashboard/compose/general/compose-file-editor.tsx
index 90bf6e30..b368aafc 100644
--- a/apps/dokploy/components/dashboard/compose/general/compose-file-editor.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/compose-file-editor.tsx
@@ -77,7 +77,7 @@ export const ComposeFileEditor = ({ composeId }: Props) => {
});
})
.catch((e) => {
- toast.error("Error to update the compose config");
+ toast.error("Error updating the Compose config");
});
};
return (
diff --git a/apps/dokploy/components/dashboard/compose/general/deploy-compose.tsx b/apps/dokploy/components/dashboard/compose/general/deploy-compose.tsx
index 25b59cc7..2c6f13e0 100644
--- a/apps/dokploy/components/dashboard/compose/general/deploy-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/deploy-compose.tsx
@@ -57,7 +57,7 @@ export const DeployCompose = ({ composeId }: Props) => {
);
})
.catch(() => {
- toast.error("Error to deploy Compose");
+ toast.error("Error deploying Compose");
});
await refetch();
diff --git a/apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx b/apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx
index cf5a7d5b..2a083666 100644
--- a/apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx
@@ -139,7 +139,7 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the Bitbucket provider");
+ toast.error("Error saving the Bitbucket provider");
});
};
diff --git a/apps/dokploy/components/dashboard/compose/general/generic/save-git-provider-compose.tsx b/apps/dokploy/components/dashboard/compose/general/generic/save-git-provider-compose.tsx
index c05dc7ed..e42f6d55 100644
--- a/apps/dokploy/components/dashboard/compose/general/generic/save-git-provider-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/generic/save-git-provider-compose.tsx
@@ -83,7 +83,7 @@ export const SaveGitProviderCompose = ({ composeId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the Git provider");
+ toast.error("Error saving the Git provider");
});
};
diff --git a/apps/dokploy/components/dashboard/compose/general/generic/save-github-provider-compose.tsx b/apps/dokploy/components/dashboard/compose/general/generic/save-github-provider-compose.tsx
index bd5e8874..af1a61d4 100644
--- a/apps/dokploy/components/dashboard/compose/general/generic/save-github-provider-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/generic/save-github-provider-compose.tsx
@@ -133,7 +133,7 @@ export const SaveGithubProviderCompose = ({ composeId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the github provider");
+ toast.error("Error saving the Github provider");
});
};
diff --git a/apps/dokploy/components/dashboard/compose/general/generic/save-gitlab-provider-compose.tsx b/apps/dokploy/components/dashboard/compose/general/generic/save-gitlab-provider-compose.tsx
index c0a871c0..5f28b342 100644
--- a/apps/dokploy/components/dashboard/compose/general/generic/save-gitlab-provider-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/generic/save-gitlab-provider-compose.tsx
@@ -146,7 +146,7 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the gitlab provider");
+ toast.error("Error saving the Gitlab provider");
});
};
diff --git a/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx b/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx
index 2c6184c8..59233acf 100644
--- a/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/randomize-compose.tsx
@@ -90,7 +90,7 @@ export const RandomizeCompose = ({ composeId }: Props) => {
toast.success("Compose updated");
})
.catch(() => {
- toast.error("Error to randomize the compose");
+ toast.error("Error randomizing the compose");
});
};
@@ -105,7 +105,7 @@ export const RandomizeCompose = ({ composeId }: Props) => {
toast.success("Compose randomized");
})
.catch(() => {
- toast.error("Error to randomize the compose");
+ toast.error("Error randomizing the compose");
});
};
diff --git a/apps/dokploy/components/dashboard/compose/general/rebuild-compose.tsx b/apps/dokploy/components/dashboard/compose/general/rebuild-compose.tsx
index 199d4f93..c2f50414 100644
--- a/apps/dokploy/components/dashboard/compose/general/rebuild-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/rebuild-compose.tsx
@@ -62,7 +62,7 @@ export const RedbuildCompose = ({ composeId }: Props) => {
});
})
.catch(() => {
- toast.error("Error to rebuild the compose");
+ toast.error("Error rebuilding the compose");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx b/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx
index ec441e02..8a2186d9 100644
--- a/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx
@@ -73,7 +73,7 @@ export const ShowConvertedCompose = ({ composeId }: Props) => {
toast.success("Fetched source type");
})
.catch((err) => {
- toast.error("Error to fetch source type", {
+ toast.error("Error fetching source type", {
description: err.message,
});
});
diff --git a/apps/dokploy/components/dashboard/compose/general/stop-compose.tsx b/apps/dokploy/components/dashboard/compose/general/stop-compose.tsx
index 2bb3cdeb..f405481b 100644
--- a/apps/dokploy/components/dashboard/compose/general/stop-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/stop-compose.tsx
@@ -53,10 +53,10 @@ export const StopCompose = ({ composeId }: Props) => {
await utils.compose.one.invalidate({
composeId,
});
- toast.success("Compose stopped succesfully");
+ toast.success("Compose stopped successfully");
})
.catch(() => {
- toast.error("Error to stop the compose");
+ toast.error("Error stopping the compose");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/compose/start-compose.tsx b/apps/dokploy/components/dashboard/compose/start-compose.tsx
index 20f990bb..fae978e2 100644
--- a/apps/dokploy/components/dashboard/compose/start-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/start-compose.tsx
@@ -49,10 +49,10 @@ export const StartCompose = ({ composeId }: Props) => {
await utils.compose.one.invalidate({
composeId,
});
- toast.success("Compose started succesfully");
+ toast.success("Compose started successfully");
})
.catch(() => {
- toast.error("Error to start the Compose");
+ toast.error("Error starting the Compose");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/compose/stop-compose.tsx b/apps/dokploy/components/dashboard/compose/stop-compose.tsx
index 3080e755..da3e3412 100644
--- a/apps/dokploy/components/dashboard/compose/stop-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/stop-compose.tsx
@@ -49,10 +49,10 @@ export const StopCompose = ({ composeId }: Props) => {
await utils.compose.one.invalidate({
composeId,
});
- toast.success("Compose stopped succesfully");
+ toast.success("Compose stopped successfully");
})
.catch(() => {
- toast.error("Error to stop the Compose");
+ toast.error("Error stopping the Compose");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/compose/update-compose.tsx b/apps/dokploy/components/dashboard/compose/update-compose.tsx
index 5991c03d..807f5b26 100644
--- a/apps/dokploy/components/dashboard/compose/update-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/update-compose.tsx
@@ -76,14 +76,14 @@ export const UpdateCompose = ({ composeId }: Props) => {
description: formData.description || "",
})
.then(() => {
- toast.success("Compose updated succesfully");
+ toast.success("Compose updated successfully");
utils.compose.one.invalidate({
composeId: composeId,
});
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update the Compose");
+ toast.error("Error updating the Compose");
})
.finally(() => {});
};
diff --git a/apps/dokploy/components/dashboard/database/backups/add-backup.tsx b/apps/dokploy/components/dashboard/database/backups/add-backup.tsx
index 94f072e7..5f349b24 100644
--- a/apps/dokploy/components/dashboard/database/backups/add-backup.tsx
+++ b/apps/dokploy/components/dashboard/database/backups/add-backup.tsx
@@ -125,7 +125,7 @@ export const AddBackup = ({ databaseId, databaseType, refetch }: Props) => {
refetch();
})
.catch(() => {
- toast.error("Error to create a backup");
+ toast.error("Error creating a backup");
});
};
return (
diff --git a/apps/dokploy/components/dashboard/database/backups/delete-backup.tsx b/apps/dokploy/components/dashboard/database/backups/delete-backup.tsx
index 1a570b54..63c6677d 100644
--- a/apps/dokploy/components/dashboard/database/backups/delete-backup.tsx
+++ b/apps/dokploy/components/dashboard/database/backups/delete-backup.tsx
@@ -46,10 +46,10 @@ export const DeleteBackup = ({ backupId, refetch }: Props) => {
.then(() => {
refetch();
- toast.success("Backup delete succesfully");
+ toast.success("Backup deleted successfully");
})
.catch(() => {
- toast.error("Error to delete the backup");
+ toast.error("Error deleting the backup");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/database/backups/update-backup.tsx b/apps/dokploy/components/dashboard/database/backups/update-backup.tsx
index 4c60a31b..55754e9d 100644
--- a/apps/dokploy/components/dashboard/database/backups/update-backup.tsx
+++ b/apps/dokploy/components/dashboard/database/backups/update-backup.tsx
@@ -109,7 +109,7 @@ export const UpdateBackup = ({ backupId, refetch }: Props) => {
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update the backup");
+ toast.error("Error updating the Backup");
});
};
diff --git a/apps/dokploy/components/dashboard/file-system/show-traefik-file.tsx b/apps/dokploy/components/dashboard/file-system/show-traefik-file.tsx
index 3dfe9875..fb5fe8f5 100644
--- a/apps/dokploy/components/dashboard/file-system/show-traefik-file.tsx
+++ b/apps/dokploy/components/dashboard/file-system/show-traefik-file.tsx
@@ -86,7 +86,7 @@ export const ShowTraefikFile = ({ path, serverId }: Props) => {
refetch();
})
.catch(() => {
- toast.error("Error to update the traefik config");
+ toast.error("Error updating the Traefik config");
});
};
diff --git a/apps/dokploy/components/dashboard/mariadb/advanced/show-mariadb-advanced-settings.tsx b/apps/dokploy/components/dashboard/mariadb/advanced/show-mariadb-advanced-settings.tsx
index 062fffcd..b4c0129d 100644
--- a/apps/dokploy/components/dashboard/mariadb/advanced/show-mariadb-advanced-settings.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/advanced/show-mariadb-advanced-settings.tsx
@@ -65,7 +65,7 @@ export const ShowAdvancedMariadb = ({ mariadbId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to Update the resources");
+ toast.error("Error updating the resources");
});
};
return (
diff --git a/apps/dokploy/components/dashboard/mariadb/advanced/show-mariadb-resources.tsx b/apps/dokploy/components/dashboard/mariadb/advanced/show-mariadb-resources.tsx
index 60cdbda0..7624441e 100644
--- a/apps/dokploy/components/dashboard/mariadb/advanced/show-mariadb-resources.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/advanced/show-mariadb-resources.tsx
@@ -18,6 +18,13 @@ import {
import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
+import {
+ TooltipProvider,
+ TooltipTrigger,
+ TooltipContent,
+ Tooltip,
+} from "@/components/ui/tooltip";
+import { InfoIcon } from "lucide-react";
import React, { useEffect } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
@@ -71,7 +78,7 @@ export const ShowMariadbResources = ({ mariadbId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to Update the resources");
+ toast.error("Error updating the resources");
});
};
return (
@@ -100,28 +107,40 @@ export const ShowMariadbResources = ({ mariadbId }: Props) => {
name="memoryReservation"
render={({ field }) => (
- Memory Reservation
+
+
Memory Reservation
+
+
+
+
+
+
+
+ Memory soft limit in bytes. Example: 256MB =
+ 268435456 bytes
+
+
+
+
+
{
const value = e.target.value;
if (value === "") {
- // Si el campo está vacío, establece el valor como null.
field.onChange(null);
} else {
const number = Number.parseInt(value, 10);
if (!Number.isNaN(number)) {
- // Solo actualiza el valor si se convierte a un número válido.
field.onChange(number);
}
}
}}
/>
-
)}
@@ -133,21 +152,34 @@ export const ShowMariadbResources = ({ mariadbId }: Props) => {
render={({ field }) => {
return (
- Memory Limit
+
+
Memory Limit
+
+
+
+
+
+
+
+ Memory hard limit in bytes. Example: 1GB =
+ 1073741824 bytes
+
+
+
+
+
{
const value = e.target.value;
if (value === "") {
- // Si el campo está vacío, establece el valor como null.
field.onChange(null);
} else {
const number = Number.parseInt(value, 10);
if (!Number.isNaN(number)) {
- // Solo actualiza el valor si se convierte a un número válido.
field.onChange(number);
}
}
@@ -166,21 +198,34 @@ export const ShowMariadbResources = ({ mariadbId }: Props) => {
render={({ field }) => {
return (
- Cpu Limit
+
+
CPU Limit
+
+
+
+
+
+
+
+ CPU quota in units of 10^-9 CPUs. Example: 2
+ CPUs = 2000000000
+
+
+
+
+
{
const value = e.target.value;
if (value === "") {
- // Si el campo está vacío, establece el valor como null.
field.onChange(null);
} else {
const number = Number.parseInt(value, 10);
if (!Number.isNaN(number)) {
- // Solo actualiza el valor si se convierte a un número válido.
field.onChange(number);
}
}
@@ -198,21 +243,34 @@ export const ShowMariadbResources = ({ mariadbId }: Props) => {
render={({ field }) => {
return (
- Cpu Reservation
+
+
CPU Reservation
+
+
+
+
+
+
+
+ CPU shares (relative weight). Example: 1 CPU =
+ 1000000000
+
+
+
+
+
{
const value = e.target.value;
if (value === "") {
- // Si el campo está vacío, establece el valor como null.
field.onChange(null);
} else {
const number = Number.parseInt(value, 10);
if (!Number.isNaN(number)) {
- // Solo actualiza el valor si se convierte a un número válido.
field.onChange(number);
}
}
diff --git a/apps/dokploy/components/dashboard/mariadb/backups/show-backup-mariadb.tsx b/apps/dokploy/components/dashboard/mariadb/backups/show-backup-mariadb.tsx
index f3d214e3..cac2820f 100644
--- a/apps/dokploy/components/dashboard/mariadb/backups/show-backup-mariadb.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/backups/show-backup-mariadb.tsx
@@ -144,7 +144,7 @@ export const ShowBackupMariadb = ({ mariadbId }: Props) => {
})
.catch(() => {
toast.error(
- "Error to Create the manual backup",
+ "Error creating the manual backup",
);
});
}}
diff --git a/apps/dokploy/components/dashboard/mariadb/environment/show-mariadb-environment.tsx b/apps/dokploy/components/dashboard/mariadb/environment/show-mariadb-environment.tsx
index 61f64cd8..418ae001 100644
--- a/apps/dokploy/components/dashboard/mariadb/environment/show-mariadb-environment.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/environment/show-mariadb-environment.tsx
@@ -70,7 +70,7 @@ export const ShowMariadbEnvironment = ({ mariadbId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to add environment");
+ toast.error("Error adding environment");
});
};
diff --git a/apps/dokploy/components/dashboard/mariadb/general/deploy-mariadb.tsx b/apps/dokploy/components/dashboard/mariadb/general/deploy-mariadb.tsx
index e3162f00..50bf5819 100644
--- a/apps/dokploy/components/dashboard/mariadb/general/deploy-mariadb.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/general/deploy-mariadb.tsx
@@ -55,12 +55,12 @@ export const DeployMariadb = ({ mariadbId }: Props) => {
await deploy({
mariadbId,
}).catch(() => {
- toast.error("Error to deploy Database");
+ toast.error("Error deploying Database");
});
await refetch();
})
.catch((e) => {
- toast.error(e.message || "Error to deploy Database");
+ toast.error(e.message || "Error deploying Database");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/mariadb/general/reset-mariadb.tsx b/apps/dokploy/components/dashboard/mariadb/general/reset-mariadb.tsx
index 3adb3b70..bee3d8ba 100644
--- a/apps/dokploy/components/dashboard/mariadb/general/reset-mariadb.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/general/reset-mariadb.tsx
@@ -55,7 +55,7 @@ export const ResetMariadb = ({ mariadbId, appName }: Props) => {
toast.success("Service Reloaded");
})
.catch(() => {
- toast.error("Error to reload the service");
+ toast.error("Error reloading the service");
});
await refetch();
}}
diff --git a/apps/dokploy/components/dashboard/mariadb/general/show-external-mariadb-credentials.tsx b/apps/dokploy/components/dashboard/mariadb/general/show-external-mariadb-credentials.tsx
index c06cacaa..f2044917 100644
--- a/apps/dokploy/components/dashboard/mariadb/general/show-external-mariadb-credentials.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/general/show-external-mariadb-credentials.tsx
@@ -72,7 +72,7 @@ export const ShowExternalMariadbCredentials = ({ mariadbId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to save the external port");
+ toast.error("Error saving the external port");
});
};
diff --git a/apps/dokploy/components/dashboard/mariadb/general/stop-mariadb.tsx b/apps/dokploy/components/dashboard/mariadb/general/stop-mariadb.tsx
index 17eb4bcd..55dc1367 100644
--- a/apps/dokploy/components/dashboard/mariadb/general/stop-mariadb.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/general/stop-mariadb.tsx
@@ -49,10 +49,10 @@ export const StopMariadb = ({ mariadbId }: Props) => {
await utils.mariadb.one.invalidate({
mariadbId,
});
- toast.success("Application stopped succesfully");
+ toast.success("Application stopped successfully");
})
.catch(() => {
- toast.error("Error to stop the Application");
+ toast.error("Error stopping the Application");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/mariadb/start-mariadb.tsx b/apps/dokploy/components/dashboard/mariadb/start-mariadb.tsx
index dff62cec..4c62f0a0 100644
--- a/apps/dokploy/components/dashboard/mariadb/start-mariadb.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/start-mariadb.tsx
@@ -49,10 +49,10 @@ export const StartMariadb = ({ mariadbId }: Props) => {
await utils.mariadb.one.invalidate({
mariadbId,
});
- toast.success("Database started succesfully");
+ toast.success("Database started successfully");
})
.catch(() => {
- toast.error("Error to start the Database");
+ toast.error("Error starting the Database");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/mariadb/update-mariadb.tsx b/apps/dokploy/components/dashboard/mariadb/update-mariadb.tsx
index 55b7e7e6..9b7c258e 100644
--- a/apps/dokploy/components/dashboard/mariadb/update-mariadb.tsx
+++ b/apps/dokploy/components/dashboard/mariadb/update-mariadb.tsx
@@ -75,13 +75,13 @@ export const UpdateMariadb = ({ mariadbId }: Props) => {
description: formData.description || "",
})
.then(() => {
- toast.success("MariaDB updated succesfully");
+ toast.success("MariaDB updated successfully");
utils.mariadb.one.invalidate({
mariadbId: mariadbId,
});
})
.catch(() => {
- toast.error("Error to update the Mariadb");
+ toast.error("Error updating the Mariadb");
})
.finally(() => {});
};
diff --git a/apps/dokploy/components/dashboard/mongo/advanced/show-mongo-advanced-settings.tsx b/apps/dokploy/components/dashboard/mongo/advanced/show-mongo-advanced-settings.tsx
index cbb178f3..d3a308f8 100644
--- a/apps/dokploy/components/dashboard/mongo/advanced/show-mongo-advanced-settings.tsx
+++ b/apps/dokploy/components/dashboard/mongo/advanced/show-mongo-advanced-settings.tsx
@@ -65,7 +65,7 @@ export const ShowAdvancedMongo = ({ mongoId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to Update the resources");
+ toast.error("Error updating the resources");
});
};
return (
diff --git a/apps/dokploy/components/dashboard/mongo/advanced/show-mongo-resources.tsx b/apps/dokploy/components/dashboard/mongo/advanced/show-mongo-resources.tsx
index c18b54a8..d4824f52 100644
--- a/apps/dokploy/components/dashboard/mongo/advanced/show-mongo-resources.tsx
+++ b/apps/dokploy/components/dashboard/mongo/advanced/show-mongo-resources.tsx
@@ -19,6 +19,13 @@ import { Input } from "@/components/ui/input";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import React, { useEffect } from "react";
+import {
+ TooltipProvider,
+ TooltipTrigger,
+ TooltipContent,
+ Tooltip,
+} from "@/components/ui/tooltip";
+import { InfoIcon } from "lucide-react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
import { z } from "zod";
@@ -71,7 +78,7 @@ export const ShowMongoResources = ({ mongoId }: Props) => {
await refetch();
})
.catch(() => {
- toast.error("Error to Update the resources");
+ toast.error("Error updating the resources");
});
};
return (
@@ -89,10 +96,6 @@ export const ShowMongoResources = ({ mongoId }: Props) => {
the changes.
-
diff --git a/apps/dokploy/components/dashboard/settings/servers/update-server.tsx b/apps/dokploy/components/dashboard/settings/servers/update-server.tsx
index 16eb5ba7..728feabd 100644
--- a/apps/dokploy/components/dashboard/settings/servers/update-server.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/update-server.tsx
@@ -31,8 +31,7 @@ import {
import { Textarea } from "@/components/ui/textarea";
import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
-import { PlusIcon } from "lucide-react";
-import { useRouter } from "next/router";
+import { useTranslation } from "next-i18next";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
@@ -60,6 +59,8 @@ interface Props {
}
export const UpdateServer = ({ serverId }: Props) => {
+ const { t } = useTranslation("settings");
+
const utils = api.useUtils();
const [isOpen, setIsOpen] = useState(false);
const { data, isLoading } = api.server.one.useQuery(
@@ -111,7 +112,7 @@ export const UpdateServer = ({ serverId }: Props) => {
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update a server");
+ toast.error("Error updating a server");
});
};
@@ -212,7 +213,7 @@ export const UpdateServer = ({ serverId }: Props) => {
name="ipAddress"
render={({ field }) => (
- IP Address
+ {t("settings.terminal.ipAddress")}
@@ -226,7 +227,7 @@ export const UpdateServer = ({ serverId }: Props) => {
name="port"
render={({ field }) => (
- Port
+ {t("settings.terminal.port")}
{
name="username"
render={({ field }) => (
- Username
+ {t("settings.terminal.username")}
@@ -273,7 +274,7 @@ export const UpdateServer = ({ serverId }: Props) => {
form="hook-form-update-server"
type="submit"
>
- Update
+ {t("settings.common.save")}
diff --git a/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-server.tsx b/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-server.tsx
index 39edad71..c8f2fe6b 100644
--- a/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-server.tsx
+++ b/apps/dokploy/components/dashboard/settings/servers/welcome-stripe/create-server.tsx
@@ -103,7 +103,7 @@ export const CreateServer = ({ stepper }: Props) => {
stepper.next();
})
.catch(() => {
- toast.error("Error to create a server");
+ toast.error("Error creating a server");
});
};
return (
diff --git a/apps/dokploy/components/dashboard/settings/ssh-keys/add-ssh-key.tsx b/apps/dokploy/components/dashboard/settings/ssh-keys/add-ssh-key.tsx
index 2d7e3d15..973a2004 100644
--- a/apps/dokploy/components/dashboard/settings/ssh-keys/add-ssh-key.tsx
+++ b/apps/dokploy/components/dashboard/settings/ssh-keys/add-ssh-key.tsx
@@ -61,7 +61,7 @@ export const AddSSHKey = ({ children }: Props) => {
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to create the SSH key");
+ toast.error("Error creating the SSH key");
});
};
@@ -74,7 +74,7 @@ export const AddSSHKey = ({ children }: Props) => {
form.setValue("publicKey", data.publicKey);
})
.catch(() => {
- toast.error("Error to generate the SSH Key");
+ toast.error("Error generating the SSH Key");
});
return (
diff --git a/apps/dokploy/components/dashboard/settings/ssh-keys/delete-ssh-key.tsx b/apps/dokploy/components/dashboard/settings/ssh-keys/delete-ssh-key.tsx
index 698bae94..eb6c32ae 100644
--- a/apps/dokploy/components/dashboard/settings/ssh-keys/delete-ssh-key.tsx
+++ b/apps/dokploy/components/dashboard/settings/ssh-keys/delete-ssh-key.tsx
@@ -48,7 +48,7 @@ export const DeleteSSHKey = ({ sshKeyId }: Props) => {
toast.success("SSH Key delete successfully");
})
.catch(() => {
- toast.error("Error to delete SSH key");
+ toast.error("Error deleting SSH key");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/settings/ssh-keys/update-ssh-key.tsx b/apps/dokploy/components/dashboard/settings/ssh-keys/update-ssh-key.tsx
index e763ee92..36cf4ef2 100644
--- a/apps/dokploy/components/dashboard/settings/ssh-keys/update-ssh-key.tsx
+++ b/apps/dokploy/components/dashboard/settings/ssh-keys/update-ssh-key.tsx
@@ -73,7 +73,7 @@ export const UpdateSSHKey = ({ children, sshKeyId = "" }: Props) => {
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update the SSH key");
+ toast.error("Error updating the SSH key");
});
};
return (
diff --git a/apps/dokploy/components/dashboard/settings/users/add-permissions.tsx b/apps/dokploy/components/dashboard/settings/users/add-permissions.tsx
index 3684c814..bb82c982 100644
--- a/apps/dokploy/components/dashboard/settings/users/add-permissions.tsx
+++ b/apps/dokploy/components/dashboard/settings/users/add-permissions.tsx
@@ -110,7 +110,7 @@ export const AddUserPermissions = ({ userId }: Props) => {
refetch();
})
.catch(() => {
- toast.error("Error to update the permissions");
+ toast.error("Error updating the permissions");
});
};
return (
diff --git a/apps/dokploy/components/dashboard/settings/users/add-user.tsx b/apps/dokploy/components/dashboard/settings/users/add-user.tsx
index 1643f37f..6a7b4fac 100644
--- a/apps/dokploy/components/dashboard/settings/users/add-user.tsx
+++ b/apps/dokploy/components/dashboard/settings/users/add-user.tsx
@@ -61,7 +61,7 @@ export const AddUser = () => {
await utils.user.all.invalidate();
})
.catch(() => {
- toast.error("Error to create the invitation");
+ toast.error("Error creating the invitation");
});
};
return (
diff --git a/apps/dokploy/components/dashboard/settings/users/delete-user.tsx b/apps/dokploy/components/dashboard/settings/users/delete-user.tsx
index e8f708da..795f0b85 100644
--- a/apps/dokploy/components/dashboard/settings/users/delete-user.tsx
+++ b/apps/dokploy/components/dashboard/settings/users/delete-user.tsx
@@ -48,10 +48,10 @@ export const DeleteUser = ({ authId }: Props) => {
})
.then(async () => {
utils.user.all.invalidate();
- toast.success("User delete succesfully");
+ toast.success("User deleted successfully");
})
.catch(() => {
- toast.error("Error to delete the user");
+ toast.error("Error deleting User");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/settings/web-domain.tsx b/apps/dokploy/components/dashboard/settings/web-domain.tsx
index 00f54904..ebdec5dc 100644
--- a/apps/dokploy/components/dashboard/settings/web-domain.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-domain.tsx
@@ -84,7 +84,7 @@ export const WebDomain = () => {
toast.success("Domain Assigned");
})
.catch(() => {
- toast.error("Error to assign the domain");
+ toast.error("Error assigning the domain");
});
};
return (
diff --git a/apps/dokploy/components/dashboard/settings/web-server/edit-traefik-env.tsx b/apps/dokploy/components/dashboard/settings/web-server/edit-traefik-env.tsx
index 838ee849..07dc2407 100644
--- a/apps/dokploy/components/dashboard/settings/web-server/edit-traefik-env.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server/edit-traefik-env.tsx
@@ -71,7 +71,7 @@ export const EditTraefikEnv = ({ children, serverId }: Props) => {
toast.success("Traefik Env Updated");
})
.catch(() => {
- toast.error("Error to update the traefik env");
+ toast.error("Error updating the Traefik env");
});
};
diff --git a/apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx b/apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx
new file mode 100644
index 00000000..fde03ffb
--- /dev/null
+++ b/apps/dokploy/components/dashboard/settings/web-server/local-server-config.tsx
@@ -0,0 +1,154 @@
+import { Button, buttonVariants } from "@/components/ui/button";
+import {
+ Accordion,
+ AccordionContent,
+ AccordionItem,
+ AccordionTrigger,
+} from "@/components/ui/accordion";
+import { Input } from "@/components/ui/input";
+import {
+ FormControl,
+ FormLabel,
+ FormField,
+ FormMessage,
+ FormItem,
+ Form,
+} from "@/components/ui/form";
+import { cn } from "@/lib/utils";
+import { zodResolver } from "@hookform/resolvers/zod";
+import { Settings } from "lucide-react";
+import React from "react";
+import { useForm } from "react-hook-form";
+import { z } from "zod";
+import { useTranslation } from "next-i18next";
+
+const Schema = z.object({
+ port: z.number().min(1, "Port must be higher than 0"),
+ username: z.string().min(1, "Username is required"),
+});
+
+type Schema = z.infer;
+
+const DEFAULT_LOCAL_SERVER_DATA: Schema = {
+ port: 22,
+ username: "root",
+};
+
+/** Returns local server data for use with local server terminal */
+export const getLocalServerData = () => {
+ try {
+ const localServerData = localStorage.getItem("localServerData");
+ const parsedLocalServerData = localServerData
+ ? (JSON.parse(localServerData) as typeof DEFAULT_LOCAL_SERVER_DATA)
+ : DEFAULT_LOCAL_SERVER_DATA;
+
+ return parsedLocalServerData;
+ } catch {
+ return DEFAULT_LOCAL_SERVER_DATA;
+ }
+};
+
+interface Props {
+ onSave: () => void;
+}
+
+const LocalServerConfig = ({ onSave }: Props) => {
+ const { t } = useTranslation("settings");
+
+ const form = useForm({
+ defaultValues: getLocalServerData(),
+ resolver: zodResolver(Schema),
+ });
+
+ const onSubmit = (data: Schema) => {
+ localStorage.setItem("localServerData", JSON.stringify(data));
+ form.reset(data);
+ onSave();
+ };
+
+ return (
+
+
+
+
+
+
+
+ {t("settings.terminal.connectionSettings")}
+
+
+
+
+
+
+
+
+ (
+
+ {t("settings.terminal.port")}
+
+ {
+ const value = e.target.value;
+ if (value === "") {
+ field.onChange(1);
+ } else {
+ const number = Number.parseInt(value, 10);
+ if (!Number.isNaN(number)) {
+ field.onChange(number);
+ }
+ }
+ }}
+ />
+
+
+
+
+ )}
+ />
+
+ (
+
+ {t("settings.terminal.username")}
+
+
+
+
+
+
+ )}
+ />
+
+
+
+
+ {t("settings.common.save")}
+
+
+
+
+ );
+};
+
+export default LocalServerConfig;
diff --git a/apps/dokploy/components/dashboard/settings/web-server/remove-ssh-private-key.tsx b/apps/dokploy/components/dashboard/settings/web-server/remove-ssh-private-key.tsx
index 8f10537a..31784fde 100644
--- a/apps/dokploy/components/dashboard/settings/web-server/remove-ssh-private-key.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server/remove-ssh-private-key.tsx
@@ -38,11 +38,11 @@ export const RemoveSSHPrivateKey = () => {
onClick={async () => {
await mutateAsync()
.then(() => {
- toast.success("SSH private key deleted succesfully");
+ toast.success("SSH private key deleted successfully");
utils.auth.get.invalidate();
})
.catch(() => {
- toast.error("Error to delete the ssh private key");
+ toast.error("Error deleting the SSH private key");
});
}}
>
diff --git a/apps/dokploy/components/dashboard/settings/web-server/terminal-modal.tsx b/apps/dokploy/components/dashboard/settings/web-server/terminal-modal.tsx
index 5bdba8b8..7c64ebc0 100644
--- a/apps/dokploy/components/dashboard/settings/web-server/terminal-modal.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server/terminal-modal.tsx
@@ -10,24 +10,38 @@ import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import { api } from "@/utils/api";
import dynamic from "next/dynamic";
import type React from "react";
+import { useState } from "react";
+import LocalServerConfig from "./local-server-config";
const Terminal = dynamic(() => import("./terminal").then((e) => e.Terminal), {
ssr: false,
});
+const getTerminalKey = () => {
+ return `terminal-${Date.now()}`;
+};
+
interface Props {
children?: React.ReactNode;
serverId: string;
}
export const TerminalModal = ({ children, serverId }: Props) => {
+ const [terminalKey, setTerminalKey] = useState(getTerminalKey());
+ const isLocalServer = serverId === "local";
+
const { data } = api.server.one.useQuery(
{
serverId,
},
- { enabled: !!serverId },
+ { enabled: !!serverId && !isLocalServer },
);
+ const handleLocalServerConfigSave = () => {
+ // Rerender Terminal component to reconnect using new component key when saving local server config
+ setTerminalKey(getTerminalKey());
+ };
+
return (
@@ -43,12 +57,16 @@ export const TerminalModal = ({ children, serverId }: Props) => {
onEscapeKeyDown={(event) => event.preventDefault()}
>
- Terminal ({data?.name})
+ Terminal ({data?.name ?? serverId})
Easy way to access the server
-
-
+ {isLocalServer && (
+
+ )}
+
+
+
diff --git a/apps/dokploy/components/dashboard/settings/web-server/terminal.tsx b/apps/dokploy/components/dashboard/settings/web-server/terminal.tsx
index d38f5d9e..e45b73d2 100644
--- a/apps/dokploy/components/dashboard/settings/web-server/terminal.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server/terminal.tsx
@@ -5,6 +5,7 @@ import { FitAddon } from "xterm-addon-fit";
import "@xterm/xterm/css/xterm.css";
import { AttachAddon } from "@xterm/addon-attach";
import { useTheme } from "next-themes";
+import { getLocalServerData } from "./local-server-config";
interface Props {
id: string;
@@ -12,9 +13,16 @@ interface Props {
}
export const Terminal: React.FC
= ({ id, serverId }) => {
- const termRef = useRef(null);
+ const termRef = useRef(null);
+ const initialized = useRef(false);
const { resolvedTheme } = useTheme();
useEffect(() => {
+ if (initialized.current) {
+ // Required in strict mode to avoid issues due to double wss connection
+ return;
+ }
+
+ initialized.current = true;
const container = document.getElementById(id);
if (container) {
container.innerHTML = "";
@@ -33,7 +41,16 @@ export const Terminal: React.FC = ({ id, serverId }) => {
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
- const wsUrl = `${protocol}//${window.location.host}/terminal?serverId=${serverId}`;
+ const urlParams = new URLSearchParams();
+ urlParams.set("serverId", serverId);
+
+ if (serverId === "local") {
+ const { port, username } = getLocalServerData();
+ urlParams.set("port", port.toString());
+ urlParams.set("username", username);
+ }
+
+ const wsUrl = `${protocol}//${window.location.host}/terminal?${urlParams}`;
const ws = new WebSocket(wsUrl);
const addonAttach = new AttachAddon(ws);
diff --git a/apps/dokploy/components/dashboard/settings/web-server/update-server-ip.tsx b/apps/dokploy/components/dashboard/settings/web-server/update-server-ip.tsx
index 264b10ac..dd3f81fd 100644
--- a/apps/dokploy/components/dashboard/settings/web-server/update-server-ip.tsx
+++ b/apps/dokploy/components/dashboard/settings/web-server/update-server-ip.tsx
@@ -85,7 +85,7 @@ export const UpdateServerIp = ({ children, serverId }: Props) => {
setIsOpen(false);
})
.catch(() => {
- toast.error("Error to update the IP of the server");
+ toast.error("Error updating the IP of the server");
});
};
diff --git a/apps/dokploy/components/dashboard/swarm/details/details-card.tsx b/apps/dokploy/components/dashboard/swarm/details/details-card.tsx
index a499f898..2de0901a 100644
--- a/apps/dokploy/components/dashboard/swarm/details/details-card.tsx
+++ b/apps/dokploy/components/dashboard/swarm/details/details-card.tsx
@@ -1,140 +1,127 @@
import { Badge } from "@/components/ui/badge";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Separator } from "@/components/ui/separator";
import { api } from "@/utils/api";
import {
- AlertCircle,
- CheckCircle,
- HelpCircle,
- Loader2,
- LoaderIcon,
+ Box,
+ Cpu,
+ Database,
+ HardDrive,
+ Loader2,
} from "lucide-react";
import { ShowNodeApplications } from "../applications/show-applications";
import { ShowNodeConfig } from "./show-node-config";
export interface SwarmList {
- ID: string;
- Hostname: string;
- Availability: string;
- EngineVersion: string;
- Status: string;
- ManagerStatus: string;
- TLSStatus: string;
+ ID: string;
+ Hostname: string;
+ Availability: string;
+ EngineVersion: string;
+ Status: string;
+ ManagerStatus: string;
+ TLSStatus: string;
}
interface Props {
- node: SwarmList;
- serverId?: string;
+ node: SwarmList;
+ serverId?: string;
}
export function NodeCard({ node, serverId }: Props) {
- const { data, isLoading } = api.swarm.getNodeInfo.useQuery({
- nodeId: node.ID,
- serverId,
- });
+ const { data, isLoading } = api.swarm.getNodeInfo.useQuery({
+ nodeId: node.ID,
+ serverId,
+ });
- const getStatusIcon = (status: string) => {
- switch (status) {
- case "Ready":
- return ;
- case "Down":
- return ;
- default:
- return ;
- }
- };
- if (isLoading) {
- return (
-
-
-
-
- {getStatusIcon(node.Status)}
- {node.Hostname}
-
-
- {node.ManagerStatus || "Worker"}
-
-
-
-
-
-
-
-
-
- );
- }
+ if (isLoading) {
+ return (
+
+
+
+
+ {node.Hostname}
+
+
+ {node.ManagerStatus || "Worker"}
+
+
+
+
+
+
+
+
+
+ );
+ }
- return (
-
-
-
-
- {getStatusIcon(node.Status)}
- {node.Hostname}
-
-
- {node.ManagerStatus || "Worker"}
-
-
-
-
-
-
- Status:
- {node.Status}
-
-
- IP Address:
- {isLoading ? (
-
- ) : (
- {data?.Status?.Addr}
- )}
-
-
- Availability:
- {node.Availability}
-
-
- Engine Version:
- {node.EngineVersion}
-
-
- CPU:
- {isLoading ? (
-
- ) : (
-
- {(data?.Description?.Resources?.NanoCPUs / 1e9).toFixed(2)} GHz
-
- )}
-
-
- Memory:
- {isLoading ? (
-
- ) : (
-
- {(
- data?.Description?.Resources?.MemoryBytes /
- 1024 ** 3
- ).toFixed(2)}{" "}
- GB
-
- )}
-
-
- TLS Status:
- {node.TLSStatus}
-
-
-
-
-
-
-
-
- );
-}
+ return (
+
+
+ Node Status
+
+
+
+
+
+
+
{node.Hostname}
+
+ {node.ManagerStatus || "Worker"}
+
+
+
+
+ TLS Status: {node.TLSStatus}
+
+
+ Availability: {node.Availability}
+
+
+
+
+
+
+
+
+
+
+ Engine Version
+
+
{node.EngineVersion}
+
+
+
+
+ CPU
+
+
{data && (data.Description?.Resources?.NanoCPUs / 1e9).toFixed(2)} Core(s)
+
+
+
+
+ Memory
+
+
+ {data && (data.Description?.Resources?.MemoryBytes / 1024 ** 3).toFixed(2)} GB
+
+
+
+
+
+ IP Address
+
+
{data?.Status?.Addr}
+
+
+
+
+
+
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/dokploy/components/dashboard/swarm/monitoring-card.tsx b/apps/dokploy/components/dashboard/swarm/monitoring-card.tsx
index e2453dd9..bd8570db 100644
--- a/apps/dokploy/components/dashboard/swarm/monitoring-card.tsx
+++ b/apps/dokploy/components/dashboard/swarm/monitoring-card.tsx
@@ -2,35 +2,35 @@ import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import {
- Tooltip,
- TooltipContent,
- TooltipProvider,
- TooltipTrigger,
+ Tooltip,
+ TooltipContent,
+ TooltipProvider,
+ TooltipTrigger,
} from "@/components/ui/tooltip";
import { api } from "@/utils/api";
import {
- AlertCircle,
- CheckCircle,
- HelpCircle,
- Loader2,
- Server,
+ Activity,
+ Loader2,
+ Monitor,
+ Settings,
+ Server,
} from "lucide-react";
import { NodeCard } from "./details/details-card";
interface Props {
- serverId?: string;
+ serverId?: string;
}
export default function SwarmMonitorCard({ serverId }: Props) {
- const { data: nodes, isLoading } = api.swarm.getNodes.useQuery({
- serverId,
- });
+ const { data: nodes, isLoading } = api.swarm.getNodes.useQuery({
+ serverId,
+ });
if (isLoading) {
return (
-
@@ -50,139 +50,116 @@ export default function SwarmMonitorCard({ serverId }: Props) {
);
}
- const totalNodes = nodes.length;
- const activeNodesCount = nodes.filter(
- (node) => node.Status === "Ready",
- ).length;
- const managerNodesCount = nodes.filter(
- (node) =>
- node.ManagerStatus === "Leader" || node.ManagerStatus === "Reachable",
- ).length;
+ const totalNodes = nodes.length;
+ const activeNodesCount = nodes.filter((node) => node.Status === "Ready").length;
+ const managerNodesCount = nodes.filter((node) =>node.ManagerStatus === "Leader" || node.ManagerStatus === "Reachable").length;
+ const activeNodes = nodes.filter((node) => node.Status === "Ready");
+ const managerNodes = nodes.filter((node) => node.ManagerStatus === "Leader" || node.ManagerStatus === "Reachable");
- const activeNodes = nodes.filter((node) => node.Status === "Ready");
- const managerNodes = nodes.filter(
- (node) =>
- node.ManagerStatus === "Leader" || node.ManagerStatus === "Reachable",
- );
+ return (
+
+
+
- const getStatusIcon = (status: string) => {
- switch (status) {
- case "Ready":
- return
;
- case "Down":
- return
;
- case "Disconnected":
- return
;
- default:
- return
;
- }
- };
+
+
+
+ Total Nodes
+
+
+
+
+
+ {totalNodes}
+
+
- return (
-
-
-
Docker Swarm Overview
- {!serverId && (
-
- window.location.replace("/dashboard/settings/cluster")
- }
- >
- Manage Cluster
-
- )}
-
-
-
-
-
- Monitor
-
-
-
-
-
- Total Nodes:
- {totalNodes}
-
-
-
Active Nodes:
-
-
-
-
- {activeNodesCount} / {totalNodes}
-
-
-
-
- {activeNodes.map((node) => (
-
- {getStatusIcon(node.Status)}
- {node.Hostname}
-
- ))}
-
-
-
-
-
-
-
Manager Nodes:
-
-
-
-
- {managerNodesCount} / {totalNodes}
-
-
-
-
- {managerNodes.map((node) => (
-
- {getStatusIcon(node.Status)}
- {node.Hostname}
-
- ))}
-
-
-
-
-
-
-
-
Node Status:
-
- {nodes.map((node) => (
-
-
- {getStatusIcon(node.Status)}
- {node.Hostname}
-
-
- {node.ManagerStatus || "Worker"}
-
-
- ))}
-
-
-
-
-
- {nodes.map((node) => (
-
- ))}
-
-
- );
-}
+
+
+
+ Active Nodes
+
+ Online
+
+
+
+
+
+
+
+
+
+ {activeNodesCount} / {totalNodes}
+
+
+
+
+ {activeNodes.map((node) => (
+
+ {node.Hostname}
+
+ ))}
+
+
+
+
+
+
+
+
+
+
+ Manager Nodes
+
+ Online
+
+
+
+
+
+
+
+
+
+
+
+ {managerNodesCount} / {totalNodes}
+
+
+
+
+ {managerNodes.map((node) => (
+
+ {node.Hostname}
+
+ ))}
+
+
+
+
+
+
+
+
+
+ {nodes.map((node) => (
+
+ ))}
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/apps/dokploy/lib/languages.ts b/apps/dokploy/lib/languages.ts
index af32858a..2530fe81 100644
--- a/apps/dokploy/lib/languages.ts
+++ b/apps/dokploy/lib/languages.ts
@@ -1,20 +1,21 @@
-export enum Languages {
- English = "en",
- Polish = "pl",
- Russian = "ru",
- French = "fr",
- German = "de",
- ChineseTraditional = "zh-Hant",
- ChineseSimplified = "zh-Hans",
- Turkish = "tr",
- Kazakh = "kz",
- Persian = "fa",
- Korean = "ko",
- Portuguese = "pt-br",
- Italian = "it",
- Japanese = "ja",
- Spanish = "es",
- Norwegian = "no",
-}
-
-export type Language = keyof typeof Languages;
+export const Languages = {
+ english: { code: "en", name: "English" },
+ polish: { code: "pl", name: "Polski" },
+ russian: { code: "ru", name: "Русский" },
+ french: { code: "fr", name: "Français" },
+ german: { code: "de", name: "Deutsch" },
+ chineseTraditional: { code: "zh-Hant", name: "繁體中文" },
+ chineseSimplified: { code: "zh-Hans", name: "简体中文" },
+ turkish: { code: "tr", name: "Türkçe" },
+ kazakh: { code: "kz", name: "Қазақ" },
+ persian: { code: "fa", name: "فارسی" },
+ korean: { code: "ko", name: "한국어" },
+ portuguese: { code: "pt-br", name: "Português" },
+ italian: { code: "it", name: "Italiano" },
+ japanese: { code: "ja", name: "日本語" },
+ spanish: { code: "es", name: "Español" },
+ norwegian: { code: "no", name: "Norsk" },
+};
+
+export type Language = keyof typeof Languages;
+export type LanguageCode = (typeof Languages)[keyof typeof Languages]["code"];
diff --git a/apps/dokploy/package.json b/apps/dokploy/package.json
index fb7f012d..f7ec4566 100644
--- a/apps/dokploy/package.json
+++ b/apps/dokploy/package.json
@@ -1,6 +1,6 @@
{
"name": "dokploy",
- "version": "v0.16.0",
+ "version": "v0.16.1",
"private": true,
"license": "Apache-2.0",
"type": "module",
diff --git a/apps/dokploy/pages/_app.tsx b/apps/dokploy/pages/_app.tsx
index b8891437..7a3ad327 100644
--- a/apps/dokploy/pages/_app.tsx
+++ b/apps/dokploy/pages/_app.tsx
@@ -68,7 +68,7 @@ export default api.withTRPC(
appWithTranslation(MyApp, {
i18n: {
defaultLocale: "en",
- locales: Object.values(Languages),
+ locales: Object.values(Languages).map(language => language.code),
localeDetection: false,
},
fallbackLng: "en",
diff --git a/apps/dokploy/pages/api/deploy/[refreshToken].ts b/apps/dokploy/pages/api/deploy/[refreshToken].ts
index bcedc370..b5fb2197 100644
--- a/apps/dokploy/pages/api/deploy/[refreshToken].ts
+++ b/apps/dokploy/pages/api/deploy/[refreshToken].ts
@@ -106,14 +106,14 @@ export default async function handler(
},
);
} catch (error) {
- res.status(400).json({ message: "Error To Deploy Application", error });
+ res.status(400).json({ message: "Error deploying Application", error });
return;
}
- res.status(200).json({ message: "App Deployed Succesfully" });
+ res.status(200).json({ message: "Application deployed successfully" });
} catch (error) {
console.log(error);
- res.status(400).json({ message: "Error To Deploy Application", error });
+ res.status(400).json({ message: "Error deploying Application", error });
}
}
diff --git a/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts b/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts
index 14a010f2..2f4caecd 100644
--- a/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts
+++ b/apps/dokploy/pages/api/deploy/compose/[refreshToken].ts
@@ -82,13 +82,13 @@ export default async function handler(
},
);
} catch (error) {
- res.status(400).json({ message: "Error To Deploy Compose", error });
+ res.status(400).json({ message: "Error deploying Compose", error });
return;
}
- res.status(200).json({ message: "Compose Deployed Succesfully" });
+ res.status(200).json({ message: "Compose deployed successfully" });
} catch (error) {
console.log(error);
- res.status(400).json({ message: "Error To Deploy Compose", error });
+ res.status(400).json({ message: "Error deploying Compose", error });
}
}
diff --git a/apps/dokploy/pages/api/deploy/github.ts b/apps/dokploy/pages/api/deploy/github.ts
index 45923762..9cefe4cf 100644
--- a/apps/dokploy/pages/api/deploy/github.ts
+++ b/apps/dokploy/pages/api/deploy/github.ts
@@ -159,7 +159,7 @@ export default async function handler(
}
res.status(200).json({ message: `Deployed ${totalApps} apps` });
} catch (error) {
- res.status(400).json({ message: "Error To Deploy Application", error });
+ res.status(400).json({ message: "Error deploying Application", error });
}
} else if (req.headers["x-github-event"] === "pull_request") {
const prId = githubBody?.pull_request?.id;
diff --git a/apps/dokploy/pages/dashboard/project/[projectId].tsx b/apps/dokploy/pages/dashboard/project/[projectId].tsx
index 6dcc9b91..3c459679 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId].tsx
@@ -2,7 +2,7 @@ import { AddApplication } from "@/components/dashboard/project/add-application";
import { AddCompose } from "@/components/dashboard/project/add-compose";
import { AddDatabase } from "@/components/dashboard/project/add-database";
import { AddTemplate } from "@/components/dashboard/project/add-template";
-import { ProjectEnviroment } from "@/components/dashboard/projects/project-enviroment";
+import { ProjectEnvironment } from "@/components/dashboard/projects/project-environment";
import {
MariadbIcon,
MongodbIcon,
@@ -204,9 +204,9 @@ const Project = (
{(auth?.rol === "admin" || user?.canCreateServices) && (
-
- Project Enviroment
-
+
+ Project Environment
+
@@ -236,7 +236,7 @@ const Project = (
-
+
{emptyServices ? (
@@ -255,7 +255,7 @@ const Project = (
`/dashboard/project/${projectId}/services/${service.type}/${service.id}`,
);
}}
- className="group relative cursor-pointer bg-transparent transition-colors hover:bg-card h-fit"
+ className="flex flex-col group relative cursor-pointer bg-transparent transition-colors hover:bg-card"
>
@@ -301,7 +301,7 @@ const Project = (
-
+
Created
diff --git a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
index 6b828dc7..e737cf2e 100644
--- a/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
+++ b/apps/dokploy/pages/dashboard/project/[projectId]/services/compose/[composeId].tsx
@@ -3,7 +3,7 @@ import { ShowVolumesCompose } from "@/components/dashboard/compose/advanced/show
import { DeleteCompose } from "@/components/dashboard/compose/delete-compose";
import { ShowDeploymentsCompose } from "@/components/dashboard/compose/deployments/show-deployments-compose";
import { ShowDomainsCompose } from "@/components/dashboard/compose/domains/show-domains";
-import { ShowEnvironmentCompose } from "@/components/dashboard/compose/enviroment/show";
+import { ShowEnvironmentCompose } from "@/components/dashboard/compose/environment/show";
import { ShowGeneralCompose } from "@/components/dashboard/compose/general/show";
import { ShowDockerLogsCompose } from "@/components/dashboard/compose/logs/show";
import { ShowDockerLogsStack } from "@/components/dashboard/compose/logs/show-stack";
diff --git a/apps/dokploy/pages/dashboard/settings/servers.tsx b/apps/dokploy/pages/dashboard/settings/servers.tsx
index 7aea531b..d25a3513 100644
--- a/apps/dokploy/pages/dashboard/settings/servers.tsx
+++ b/apps/dokploy/pages/dashboard/settings/servers.tsx
@@ -2,6 +2,7 @@ import { ShowServers } from "@/components/dashboard/settings/servers/show-server
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { SettingsLayout } from "@/components/layouts/settings-layout";
import { appRouter } from "@/server/api/root";
+import { getLocale, serverSideTranslations } from "@/utils/i18n";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
@@ -29,6 +30,7 @@ export async function getServerSideProps(
ctx: GetServerSidePropsContext<{ serviceId: string }>,
) {
const { req, res } = ctx;
+ const locale = await getLocale(req.cookies);
const { user, session } = await validateRequest(req, res);
if (!user) {
return {
@@ -64,6 +66,7 @@ export async function getServerSideProps(
return {
props: {
trpcState: helpers.dehydrate(),
+ ...(await serverSideTranslations(locale, ["settings"])),
},
};
}
diff --git a/apps/dokploy/pages/dashboard/swarm.tsx b/apps/dokploy/pages/dashboard/swarm.tsx
index 15a7d793..f36de68e 100644
--- a/apps/dokploy/pages/dashboard/swarm.tsx
+++ b/apps/dokploy/pages/dashboard/swarm.tsx
@@ -10,9 +10,7 @@ import superjson from "superjson";
const Dashboard = () => {
return (
<>
-
-
-
+
>
);
};
diff --git a/apps/dokploy/pages/index.tsx b/apps/dokploy/pages/index.tsx
index ac196ff5..4debcc66 100644
--- a/apps/dokploy/pages/index.tsx
+++ b/apps/dokploy/pages/index.tsx
@@ -81,14 +81,14 @@ export default function Home({ IS_CLOUD }: Props) {
const onSubmit = async (values: Login) => {
await mutateAsync({
- email: values.email,
+ email: values.email.toLowerCase(),
password: values.password,
})
.then((data) => {
if (data.is2FAEnabled) {
setTemp(data);
} else {
- toast.success("Signin succesfully", {
+ toast.success("Successfully signed in", {
duration: 2000,
});
router.push("/dashboard/projects");
diff --git a/apps/dokploy/pages/invitation.tsx b/apps/dokploy/pages/invitation.tsx
index adb1cf24..b509aca7 100644
--- a/apps/dokploy/pages/invitation.tsx
+++ b/apps/dokploy/pages/invitation.tsx
@@ -113,7 +113,7 @@ const Invitation = ({ token, invitation, isCloud }: Props) => {
token: token,
})
.then(() => {
- toast.success("User registration succesfuly", {
+ toast.success("User registered successfuly", {
description:
"Please check your inbox or spam folder to confirm your account.",
duration: 100000,
diff --git a/apps/dokploy/pages/register.tsx b/apps/dokploy/pages/register.tsx
index 30bae7a3..cc563f91 100644
--- a/apps/dokploy/pages/register.tsx
+++ b/apps/dokploy/pages/register.tsx
@@ -95,7 +95,7 @@ const Register = ({ isCloud }: Props) => {
password: values.password,
})
.then(() => {
- toast.success("User registration succesfuly", {
+ toast.success("User registered successfuly", {
duration: 2000,
});
if (!isCloud) {
@@ -137,7 +137,7 @@ const Register = ({ isCloud }: Props) => {
{data?.type === "cloud" && (
- Registration succesfuly, Please check your inbox or spam
+ Registered successfully, please check your inbox or spam
folder to confirm your account.
diff --git a/apps/dokploy/pages/reset-password.tsx b/apps/dokploy/pages/reset-password.tsx
index 227a1d6b..9c598431 100644
--- a/apps/dokploy/pages/reset-password.tsx
+++ b/apps/dokploy/pages/reset-password.tsx
@@ -83,13 +83,13 @@ export default function Home({ token }: Props) {
password: values.password,
})
.then((data) => {
- toast.success("Password reset succesfully", {
+ toast.success("Password reset successfully", {
duration: 2000,
});
router.push("/");
})
.catch(() => {
- toast.error("Error to reset password", {
+ toast.error("Error resetting password", {
duration: 2000,
});
});
diff --git a/apps/dokploy/pages/send-reset-password.tsx b/apps/dokploy/pages/send-reset-password.tsx
index daac30e1..6a8eb5ab 100644
--- a/apps/dokploy/pages/send-reset-password.tsx
+++ b/apps/dokploy/pages/send-reset-password.tsx
@@ -76,7 +76,7 @@ export default function Home() {
});
})
.catch(() => {
- toast.error("Error to send email", {
+ toast.error("Error sending email", {
duration: 2000,
});
});
diff --git a/apps/dokploy/public/locales/en/settings.json b/apps/dokploy/public/locales/en/settings.json
index 6bfa4e3b..ebc5ea62 100644
--- a/apps/dokploy/public/locales/en/settings.json
+++ b/apps/dokploy/public/locales/en/settings.json
@@ -1,5 +1,6 @@
{
"settings.common.save": "Save",
+ "settings.common.enterTerminal": "Enter the terminal",
"settings.server.domain.title": "Server Domain",
"settings.server.domain.description": "Add a domain to your server application.",
"settings.server.domain.form.domain": "Domain",
@@ -48,5 +49,10 @@
"settings.appearance.themes.dark": "Dark",
"settings.appearance.themes.system": "System",
"settings.appearance.language": "Language",
- "settings.appearance.languageDescription": "Select a language for your dashboard"
+ "settings.appearance.languageDescription": "Select a language for your dashboard",
+
+ "settings.terminal.connectionSettings": "Connection settings",
+ "settings.terminal.ipAddress": "IP Address",
+ "settings.terminal.port": "Port",
+ "settings.terminal.username": "Username"
}
diff --git a/apps/dokploy/public/locales/pl/settings.json b/apps/dokploy/public/locales/pl/settings.json
index 48531e69..93414825 100644
--- a/apps/dokploy/public/locales/pl/settings.json
+++ b/apps/dokploy/public/locales/pl/settings.json
@@ -1,5 +1,6 @@
{
"settings.common.save": "Zapisz",
+ "settings.common.enterTerminal": "Otwórz terminal",
"settings.server.domain.title": "Domena",
"settings.server.domain.description": "Dodaj domenę do aplikacji",
"settings.server.domain.form.domain": "Domena",
@@ -40,5 +41,10 @@
"settings.appearance.themes.dark": "Ciemny",
"settings.appearance.themes.system": "System",
"settings.appearance.language": "Język",
- "settings.appearance.languageDescription": "Wybierz język swojego pulpitu"
+ "settings.appearance.languageDescription": "Wybierz język swojego pulpitu",
+
+ "settings.terminal.connectionSettings": "Ustawienia połączenia",
+ "settings.terminal.ipAddress": "Adres IP",
+ "settings.terminal.port": "Port",
+ "settings.terminal.username": "Nazwa użytkownika"
}
diff --git a/apps/dokploy/public/templates/unifi.webp b/apps/dokploy/public/templates/unifi.webp
new file mode 100644
index 00000000..ffe1f244
Binary files /dev/null and b/apps/dokploy/public/templates/unifi.webp differ
diff --git a/apps/dokploy/reset-password.ts b/apps/dokploy/reset-password.ts
index e13c348a..43b11fdf 100644
--- a/apps/dokploy/reset-password.ts
+++ b/apps/dokploy/reset-password.ts
@@ -21,6 +21,6 @@ import { generateRandomPassword } from "@dokploy/server";
process.exit(0);
} catch (error) {
- console.log("Error to reset password", error);
+ console.log("Error resetting password", error);
}
})();
diff --git a/apps/dokploy/server/api/routers/admin.ts b/apps/dokploy/server/api/routers/admin.ts
index 6029c713..696f3c79 100644
--- a/apps/dokploy/server/api/routers/admin.ts
+++ b/apps/dokploy/server/api/routers/admin.ts
@@ -49,7 +49,7 @@ export const adminRouter = createTRPCRouter({
throw new TRPCError({
code: "BAD_REQUEST",
message:
- "Error to create this user\ncheck if the email is not registered",
+ "Error creating this user\ncheck if the email is not registered",
cause: error,
});
}
@@ -70,7 +70,7 @@ export const adminRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to delete this user",
+ message: "Error deleting this user",
cause: error,
});
}
diff --git a/apps/dokploy/server/api/routers/application.ts b/apps/dokploy/server/api/routers/application.ts
index b03211c4..13b7c80d 100644
--- a/apps/dokploy/server/api/routers/application.ts
+++ b/apps/dokploy/server/api/routers/application.ts
@@ -90,7 +90,7 @@ export const applicationRouter = createTRPCRouter({
}
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the application",
+ message: "Error creating the application",
cause: error,
});
}
@@ -441,7 +441,7 @@ export const applicationRouter = createTRPCRouter({
if (!updateApp) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to update application",
+ message: "Error updating application",
});
}
diff --git a/apps/dokploy/server/api/routers/auth.ts b/apps/dokploy/server/api/routers/auth.ts
index b02ab617..f8bbfa9b 100644
--- a/apps/dokploy/server/api/routers/auth.ts
+++ b/apps/dokploy/server/api/routers/auth.ts
@@ -79,7 +79,7 @@ export const authRouter = createTRPCRouter({
throw new TRPCError({
code: "BAD_REQUEST",
// @ts-ignore
- message: `Error: ${error?.code === "23505" ? "Email already exists" : "Error to create admin"}`,
+ message: `Error: ${error?.code === "23505" ? "Email already exists" : "Error creating admin"}`,
cause: error,
});
}
@@ -111,7 +111,7 @@ export const authRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the user",
+ message: "Error creating the user",
cause: error,
});
}
@@ -162,7 +162,7 @@ export const authRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: `Error: ${error instanceof Error ? error.message : "Error to login"}`,
+ message: `Error: ${error instanceof Error ? error.message : "Login error"}`,
cause: error,
});
}
diff --git a/apps/dokploy/server/api/routers/backup.ts b/apps/dokploy/server/api/routers/backup.ts
index c6ae38b6..0b8d7ab1 100644
--- a/apps/dokploy/server/api/routers/backup.ts
+++ b/apps/dokploy/server/api/routers/backup.ts
@@ -69,7 +69,7 @@ export const backupRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the Backup",
+ message: "Error creating the Backup",
cause: error,
});
}
@@ -113,7 +113,7 @@ export const backupRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to update this Backup",
+ message: "Error updating this Backup",
});
}
}),
@@ -135,7 +135,7 @@ export const backupRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to delete this Backup",
+ message: "Error deleting this Backup",
cause: error,
});
}
@@ -152,7 +152,7 @@ export const backupRouter = createTRPCRouter({
console.log(error);
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to run manual postgres backup ",
+ message: "Error running manual Postgres backup ",
cause: error,
});
}
@@ -169,7 +169,7 @@ export const backupRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to run manual mysql backup ",
+ message: "Error running manual MySQL backup ",
cause: error,
});
}
@@ -185,7 +185,7 @@ export const backupRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to run manual mariadb backup ",
+ message: "Error running manual Mariadb backup ",
cause: error,
});
}
@@ -201,7 +201,7 @@ export const backupRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to run manual mongo backup ",
+ message: "Error running manual Mongo backup ",
cause: error,
});
}
diff --git a/apps/dokploy/server/api/routers/bitbucket.ts b/apps/dokploy/server/api/routers/bitbucket.ts
index 48b7fdd4..c66716d3 100644
--- a/apps/dokploy/server/api/routers/bitbucket.ts
+++ b/apps/dokploy/server/api/routers/bitbucket.ts
@@ -27,7 +27,7 @@ export const bitbucketRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create this bitbucket provider",
+ message: "Error creating this Bitbucket provider",
cause: error,
});
}
diff --git a/apps/dokploy/server/api/routers/cluster.ts b/apps/dokploy/server/api/routers/cluster.ts
index e42d4b04..7ded632c 100644
--- a/apps/dokploy/server/api/routers/cluster.ts
+++ b/apps/dokploy/server/api/routers/cluster.ts
@@ -35,7 +35,7 @@ export const clusterRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "INTERNAL_SERVER_ERROR",
- message: "Error to remove the node",
+ message: "Error removing the node",
cause: error,
});
}
diff --git a/apps/dokploy/server/api/routers/compose.ts b/apps/dokploy/server/api/routers/compose.ts
index 5f53752b..dab37e78 100644
--- a/apps/dokploy/server/api/routers/compose.ts
+++ b/apps/dokploy/server/api/routers/compose.ts
@@ -198,7 +198,7 @@ export const composeRouter = createTRPCRouter({
} catch (err) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to fetch source type",
+ message: "Error fetching source type",
cause: err,
});
}
diff --git a/apps/dokploy/server/api/routers/destination.ts b/apps/dokploy/server/api/routers/destination.ts
index 6374ec45..d13928be 100644
--- a/apps/dokploy/server/api/routers/destination.ts
+++ b/apps/dokploy/server/api/routers/destination.ts
@@ -32,7 +32,7 @@ export const destinationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the destination",
+ message: "Error creating the destination",
cause: error,
});
}
@@ -75,7 +75,7 @@ export const destinationRouter = createTRPCRouter({
message:
error instanceof Error
? error?.message
- : "Error to connect to bucket",
+ : "Error connecting to bucket",
cause: error,
});
}
diff --git a/apps/dokploy/server/api/routers/domain.ts b/apps/dokploy/server/api/routers/domain.ts
index b0a1000c..f122cf86 100644
--- a/apps/dokploy/server/api/routers/domain.ts
+++ b/apps/dokploy/server/api/routers/domain.ts
@@ -49,7 +49,7 @@ export const domainRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the domain",
+ message: "Error creating the domain",
cause: error,
});
}
diff --git a/apps/dokploy/server/api/routers/git-provider.ts b/apps/dokploy/server/api/routers/git-provider.ts
index e1e8ef8b..abd93392 100644
--- a/apps/dokploy/server/api/routers/git-provider.ts
+++ b/apps/dokploy/server/api/routers/git-provider.ts
@@ -32,14 +32,14 @@ export const gitProviderRouter = createTRPCRouter({
// TODO: Remove isCloud in the next versions of dokploy
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not allowed to delete this git provider",
+ message: "You are not allowed to delete this Git provider",
});
}
return await removeGitProvider(input.gitProviderId);
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to delete this git provider",
+ message: "Error deleting this Git provider",
});
}
}),
diff --git a/apps/dokploy/server/api/routers/gitlab.ts b/apps/dokploy/server/api/routers/gitlab.ts
index c057061f..6d35f4a2 100644
--- a/apps/dokploy/server/api/routers/gitlab.ts
+++ b/apps/dokploy/server/api/routers/gitlab.ts
@@ -30,7 +30,7 @@ export const gitlabRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create this gitlab provider",
+ message: "Error creating this Gitlab provider",
cause: error,
});
}
@@ -43,7 +43,7 @@ export const gitlabRouter = createTRPCRouter({
//TODO: Remove this line when the cloud version is ready
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not allowed to access this gitlab provider",
+ message: "You are not allowed to access this Gitlab provider",
});
}
return gitlabProvider;
@@ -82,7 +82,7 @@ export const gitlabRouter = createTRPCRouter({
//TODO: Remove this line when the cloud version is ready
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not allowed to access this gitlab provider",
+ message: "You are not allowed to access this Gitlab provider",
});
}
return await getGitlabRepositories(input.gitlabId);
@@ -96,7 +96,7 @@ export const gitlabRouter = createTRPCRouter({
//TODO: Remove this line when the cloud version is ready
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not allowed to access this gitlab provider",
+ message: "You are not allowed to access this Gitlab provider",
});
}
return await getGitlabBranches(input);
@@ -113,7 +113,7 @@ export const gitlabRouter = createTRPCRouter({
//TODO: Remove this line when the cloud version is ready
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not allowed to access this gitlab provider",
+ message: "You are not allowed to access this Gitlab provider",
});
}
const result = await testGitlabConnection(input);
@@ -134,7 +134,7 @@ export const gitlabRouter = createTRPCRouter({
//TODO: Remove this line when the cloud version is ready
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not allowed to access this gitlab provider",
+ message: "You are not allowed to access this Gitlab provider",
});
}
if (input.name) {
diff --git a/apps/dokploy/server/api/routers/mariadb.ts b/apps/dokploy/server/api/routers/mariadb.ts
index 6755d647..51b4b876 100644
--- a/apps/dokploy/server/api/routers/mariadb.ts
+++ b/apps/dokploy/server/api/routers/mariadb.ts
@@ -41,7 +41,7 @@ export const mariadbRouter = createTRPCRouter({
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You need to use a server to create a mariadb",
+ message: "You need to use a server to create a Mariadb",
});
}
@@ -83,7 +83,7 @@ export const mariadbRouter = createTRPCRouter({
if (mariadb.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to access this mariadb",
+ message: "You are not authorized to access this Mariadb",
});
}
return mariadb;
@@ -96,7 +96,7 @@ export const mariadbRouter = createTRPCRouter({
if (service.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to start this mariadb",
+ message: "You are not authorized to start this Mariadb",
});
}
if (service.serverId) {
@@ -149,7 +149,7 @@ export const mariadbRouter = createTRPCRouter({
if (mariadb.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this mariadb",
+ message: "You are not authorized to deploy this Mariadb",
});
}
@@ -162,7 +162,7 @@ export const mariadbRouter = createTRPCRouter({
if (mongo.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to change this mariadb status",
+ message: "You are not authorized to change this Mariadb status",
});
}
await updateMariadbById(input.mariadbId, {
@@ -181,7 +181,7 @@ export const mariadbRouter = createTRPCRouter({
if (mongo.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to delete this mariadb",
+ message: "You are not authorized to delete this Mariadb",
});
}
@@ -215,7 +215,7 @@ export const mariadbRouter = createTRPCRouter({
if (!service) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to add environment variables",
+ message: "Error adding environment variables",
});
}
@@ -228,7 +228,7 @@ export const mariadbRouter = createTRPCRouter({
if (mariadb.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to reload this mariadb",
+ message: "You are not authorized to reload this Mariadb",
});
}
if (mariadb.serverId) {
@@ -258,7 +258,7 @@ export const mariadbRouter = createTRPCRouter({
if (mariadb.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to update this mariadb",
+ message: "You are not authorized to update this Mariadb",
});
}
const service = await updateMariadbById(mariadbId, {
@@ -268,7 +268,7 @@ export const mariadbRouter = createTRPCRouter({
if (!service) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to update mariadb",
+ message: "Update: Error updating Mariadb",
});
}
diff --git a/apps/dokploy/server/api/routers/mongo.ts b/apps/dokploy/server/api/routers/mongo.ts
index 49dc5ec2..f6305835 100644
--- a/apps/dokploy/server/api/routers/mongo.ts
+++ b/apps/dokploy/server/api/routers/mongo.ts
@@ -257,7 +257,7 @@ export const mongoRouter = createTRPCRouter({
if (!service) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to add environment variables",
+ message: "Error adding environment variables",
});
}
@@ -281,7 +281,7 @@ export const mongoRouter = createTRPCRouter({
if (!service) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to update mongo",
+ message: "Update: Error updating Mongo",
});
}
diff --git a/apps/dokploy/server/api/routers/mysql.ts b/apps/dokploy/server/api/routers/mysql.ts
index 893adb9c..94bc0ace 100644
--- a/apps/dokploy/server/api/routers/mysql.ts
+++ b/apps/dokploy/server/api/routers/mysql.ts
@@ -42,7 +42,7 @@ export const mysqlRouter = createTRPCRouter({
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You need to use a server to create a mysql",
+ message: "You need to use a server to create a MySQL",
});
}
1;
@@ -74,7 +74,7 @@ export const mysqlRouter = createTRPCRouter({
}
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error input: Inserting mysql database",
+ message: "Error input: Inserting MySQL database",
cause: error,
});
}
@@ -89,7 +89,7 @@ export const mysqlRouter = createTRPCRouter({
if (mysql.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to access this mysql",
+ message: "You are not authorized to access this MySQL",
});
}
return mysql;
@@ -102,7 +102,7 @@ export const mysqlRouter = createTRPCRouter({
if (service.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to start this mysql",
+ message: "You are not authorized to start this MySQL",
});
}
@@ -124,7 +124,7 @@ export const mysqlRouter = createTRPCRouter({
if (mongo.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to stop this mysql",
+ message: "You are not authorized to stop this MySQL",
});
}
if (mongo.serverId) {
@@ -161,7 +161,7 @@ export const mysqlRouter = createTRPCRouter({
if (mysql.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this mysql",
+ message: "You are not authorized to deploy this MySQL",
});
}
return deployMySql(input.mysqlId);
@@ -173,7 +173,7 @@ export const mysqlRouter = createTRPCRouter({
if (mongo.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to change this mysql status",
+ message: "You are not authorized to change this MySQL status",
});
}
await updateMySqlById(input.mysqlId, {
@@ -188,7 +188,7 @@ export const mysqlRouter = createTRPCRouter({
if (mysql.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to reload this mysql",
+ message: "You are not authorized to reload this MySQL",
});
}
if (mysql.serverId) {
@@ -219,7 +219,7 @@ export const mysqlRouter = createTRPCRouter({
if (mongo.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to delete this mysql",
+ message: "You are not authorized to delete this MySQL",
});
}
@@ -253,7 +253,7 @@ export const mysqlRouter = createTRPCRouter({
if (!service) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to add environment variables",
+ message: "Error adding environment variables",
});
}
@@ -267,7 +267,7 @@ export const mysqlRouter = createTRPCRouter({
if (mysql.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to update this mysql",
+ message: "You are not authorized to update this MySQL",
});
}
const service = await updateMySqlById(mysqlId, {
@@ -277,7 +277,7 @@ export const mysqlRouter = createTRPCRouter({
if (!service) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to update mysql",
+ message: "Update: Error updating MySQL",
});
}
diff --git a/apps/dokploy/server/api/routers/notification.ts b/apps/dokploy/server/api/routers/notification.ts
index ba226d45..f8869503 100644
--- a/apps/dokploy/server/api/routers/notification.ts
+++ b/apps/dokploy/server/api/routers/notification.ts
@@ -50,7 +50,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the notification",
+ message: "Error creating the notification",
cause: error,
});
}
@@ -87,7 +87,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to test the notification",
+ message: "Error testing the notification",
cause: error,
});
}
@@ -100,7 +100,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the notification",
+ message: "Error creating the notification",
cause: error,
});
}
@@ -125,7 +125,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to update the notification",
+ message: "Error updating the notification",
cause: error,
});
}
@@ -139,7 +139,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to test the notification",
+ message: "Error testing the notification",
cause: error,
});
}
@@ -152,7 +152,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the notification",
+ message: "Error creating the notification",
cause: error,
});
}
@@ -177,7 +177,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to update the notification",
+ message: "Error updating the notification",
cause: error,
});
}
@@ -200,7 +200,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to test the notification",
+ message: "Error testing the notification",
cause: error,
});
}
@@ -213,7 +213,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the notification",
+ message: "Error creating the notification",
cause: error,
});
}
@@ -237,7 +237,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to update the notification",
+ message: "Error updating the notification",
cause: error,
});
}
@@ -255,7 +255,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to test the notification",
+ message: "Error testing the notification",
cause: error,
});
}
@@ -276,7 +276,7 @@ export const notificationRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to delete this notification",
+ message: "Error deleting this notification",
});
}
}),
diff --git a/apps/dokploy/server/api/routers/port.ts b/apps/dokploy/server/api/routers/port.ts
index 409eb8f0..bfbc9863 100644
--- a/apps/dokploy/server/api/routers/port.ts
+++ b/apps/dokploy/server/api/routers/port.ts
@@ -58,7 +58,7 @@ export const portRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to updating port",
+ message: "Error updating the port",
});
}
}),
diff --git a/apps/dokploy/server/api/routers/postgres.ts b/apps/dokploy/server/api/routers/postgres.ts
index 14f9d967..4afacd71 100644
--- a/apps/dokploy/server/api/routers/postgres.ts
+++ b/apps/dokploy/server/api/routers/postgres.ts
@@ -40,7 +40,7 @@ export const postgresRouter = createTRPCRouter({
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You need to use a server to create a postgres",
+ message: "You need to use a server to create a Postgres",
});
}
@@ -71,7 +71,7 @@ export const postgresRouter = createTRPCRouter({
}
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error input: Inserting postgresql database",
+ message: "Error input: Inserting Postgres database",
cause: error,
});
}
@@ -87,7 +87,7 @@ export const postgresRouter = createTRPCRouter({
if (postgres.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to access this postgres",
+ message: "You are not authorized to access this Postgres",
});
}
return postgres;
@@ -101,7 +101,7 @@ export const postgresRouter = createTRPCRouter({
if (service.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to start this postgres",
+ message: "You are not authorized to start this Postgres",
});
}
@@ -123,7 +123,7 @@ export const postgresRouter = createTRPCRouter({
if (postgres.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to stop this postgres",
+ message: "You are not authorized to stop this Postgres",
});
}
if (postgres.serverId) {
@@ -161,7 +161,7 @@ export const postgresRouter = createTRPCRouter({
if (postgres.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this postgres",
+ message: "You are not authorized to deploy this Postgres",
});
}
return deployPostgres(input.postgresId);
@@ -173,7 +173,7 @@ export const postgresRouter = createTRPCRouter({
if (postgres.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to change this postgres status",
+ message: "You are not authorized to change this Postgres status",
});
}
await updatePostgresById(input.postgresId, {
@@ -192,7 +192,7 @@ export const postgresRouter = createTRPCRouter({
if (postgres.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to delete this postgres",
+ message: "You are not authorized to delete this Postgres",
});
}
@@ -222,7 +222,7 @@ export const postgresRouter = createTRPCRouter({
if (!service) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to add environment variables",
+ message: "Error adding environment variables",
});
}
@@ -235,7 +235,7 @@ export const postgresRouter = createTRPCRouter({
if (postgres.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to reload this postgres",
+ message: "You are not authorized to reload this Postgres",
});
}
if (postgres.serverId) {
@@ -265,7 +265,7 @@ export const postgresRouter = createTRPCRouter({
if (postgres.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to update this postgres",
+ message: "You are not authorized to update this Postgres",
});
}
const service = await updatePostgresById(postgresId, {
@@ -275,7 +275,7 @@ export const postgresRouter = createTRPCRouter({
if (!service) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to update postgres",
+ message: "Error updating Postgres",
});
}
diff --git a/apps/dokploy/server/api/routers/project.ts b/apps/dokploy/server/api/routers/project.ts
index 81b60004..967b39e3 100644
--- a/apps/dokploy/server/api/routers/project.ts
+++ b/apps/dokploy/server/api/routers/project.ts
@@ -58,7 +58,7 @@ export const projectRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: `Error to create the project: ${error instanceof Error ? error.message : error}`,
+ message: `Error creating the project: ${error instanceof Error ? error.message : error}`,
cause: error,
});
}
diff --git a/apps/dokploy/server/api/routers/redis.ts b/apps/dokploy/server/api/routers/redis.ts
index fdd2db9c..672b550e 100644
--- a/apps/dokploy/server/api/routers/redis.ts
+++ b/apps/dokploy/server/api/routers/redis.ts
@@ -42,7 +42,7 @@ export const redisRouter = createTRPCRouter({
if (IS_CLOUD && !input.serverId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You need to use a server to create a redis",
+ message: "You need to use a server to create a Redis",
});
}
@@ -82,7 +82,7 @@ export const redisRouter = createTRPCRouter({
if (redis.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to access this redis",
+ message: "You are not authorized to access this Redis",
});
}
return redis;
@@ -95,7 +95,7 @@ export const redisRouter = createTRPCRouter({
if (redis.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to start this redis",
+ message: "You are not authorized to start this Redis",
});
}
@@ -117,7 +117,7 @@ export const redisRouter = createTRPCRouter({
if (redis.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to reload this redis",
+ message: "You are not authorized to reload this Redis",
});
}
if (redis.serverId) {
@@ -147,7 +147,7 @@ export const redisRouter = createTRPCRouter({
if (redis.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to stop this redis",
+ message: "You are not authorized to stop this Redis",
});
}
if (redis.serverId) {
@@ -184,7 +184,7 @@ export const redisRouter = createTRPCRouter({
if (redis.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to deploy this redis",
+ message: "You are not authorized to deploy this Redis",
});
}
return deployRedis(input.redisId);
@@ -196,7 +196,7 @@ export const redisRouter = createTRPCRouter({
if (mongo.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to change this redis status",
+ message: "You are not authorized to change this Redis status",
});
}
await updateRedisById(input.redisId, {
@@ -216,7 +216,7 @@ export const redisRouter = createTRPCRouter({
if (redis.project.adminId !== ctx.user.adminId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not authorized to delete this redis",
+ message: "You are not authorized to delete this Redis",
});
}
@@ -250,7 +250,7 @@ export const redisRouter = createTRPCRouter({
if (!updatedRedis) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to add environment variables",
+ message: "Error adding environment variables",
});
}
@@ -267,7 +267,7 @@ export const redisRouter = createTRPCRouter({
if (!redis) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to update redis",
+ message: "Error updating Redis",
});
}
diff --git a/apps/dokploy/server/api/routers/registry.ts b/apps/dokploy/server/api/routers/registry.ts
index 8ca4a8a0..2cadce71 100644
--- a/apps/dokploy/server/api/routers/registry.ts
+++ b/apps/dokploy/server/api/routers/registry.ts
@@ -54,7 +54,7 @@ export const registryRouter = createTRPCRouter({
if (!application) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Update: Error to update registry",
+ message: "Error updating registry",
});
}
diff --git a/apps/dokploy/server/api/routers/server.ts b/apps/dokploy/server/api/routers/server.ts
index 4076d6e9..d01e4638 100644
--- a/apps/dokploy/server/api/routers/server.ts
+++ b/apps/dokploy/server/api/routers/server.ts
@@ -52,7 +52,7 @@ export const serverRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the server",
+ message: "Error creating the server",
cause: error,
});
}
diff --git a/apps/dokploy/server/api/routers/settings.ts b/apps/dokploy/server/api/routers/settings.ts
index 8bec9b52..b40ee95b 100644
--- a/apps/dokploy/server/api/routers/settings.ts
+++ b/apps/dokploy/server/api/routers/settings.ts
@@ -748,7 +748,7 @@ export const settingsRouter = createTRPCRouter({
message:
error instanceof Error
? error.message
- : "Error to update Traefik ports",
+ : "Error updating Traefik ports",
cause: error,
});
}
diff --git a/apps/dokploy/server/api/routers/ssh-key.ts b/apps/dokploy/server/api/routers/ssh-key.ts
index ceb32993..fe2f24f9 100644
--- a/apps/dokploy/server/api/routers/ssh-key.ts
+++ b/apps/dokploy/server/api/routers/ssh-key.ts
@@ -31,7 +31,7 @@ export const sshRouter = createTRPCRouter({
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the ssh key",
+ message: "Error creating the SSH key",
cause: error,
});
}
@@ -45,7 +45,7 @@ export const sshRouter = createTRPCRouter({
// TODO: Remove isCloud in the next versions of dokploy
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not allowed to delete this ssh key",
+ message: "You are not allowed to delete this SSH key",
});
}
@@ -63,7 +63,7 @@ export const sshRouter = createTRPCRouter({
// TODO: Remove isCloud in the next versions of dokploy
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not allowed to access this ssh key",
+ message: "You are not allowed to access this SSH key",
});
}
return sshKey;
@@ -89,14 +89,14 @@ export const sshRouter = createTRPCRouter({
// TODO: Remove isCloud in the next versions of dokploy
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You are not allowed to update this ssh key",
+ message: "You are not allowed to update this SSH key",
});
}
return await updateSSHKeyById(input);
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to update this ssh key",
+ message: "Error updating this SSH key",
cause: error,
});
}
diff --git a/apps/dokploy/server/db/reset.ts b/apps/dokploy/server/db/reset.ts
index 7497bec3..c2229147 100644
--- a/apps/dokploy/server/db/reset.ts
+++ b/apps/dokploy/server/db/reset.ts
@@ -15,7 +15,7 @@ const clearDb = async (): Promise => {
console.log(tables);
await pg.end();
} catch (error) {
- console.error("Error to clean database", error);
+ console.error("Error cleaning database", error);
} finally {
}
};
diff --git a/apps/dokploy/server/wss/terminal.ts b/apps/dokploy/server/wss/terminal.ts
index b1ecb908..8c661c8a 100644
--- a/apps/dokploy/server/wss/terminal.ts
+++ b/apps/dokploy/server/wss/terminal.ts
@@ -1,8 +1,13 @@
import type http from "node:http";
-import { findServerById, validateWebSocketRequest } from "@dokploy/server";
+import {
+ findServerById,
+ IS_CLOUD,
+ validateWebSocketRequest,
+} from "@dokploy/server";
import { publicIpv4, publicIpv6 } from "public-ip";
-import { Client } from "ssh2";
+import { Client, type ConnectConfig } from "ssh2";
import { WebSocketServer } from "ws";
+import { setupLocalServerSSHKey } from "./utils";
export const getPublicIpWithFallback = async () => {
// @ts-ignore
@@ -55,21 +60,66 @@ export const setupTerminalWebSocketServer = (
return;
}
- const server = await findServerById(serverId);
+ let connectionDetails: ConnectConfig = {};
- if (!server) {
- ws.close();
- return;
+ const isLocalServer = serverId === "local";
+
+ if (isLocalServer && !IS_CLOUD) {
+ const port = Number(url.searchParams.get("port"));
+ const username = url.searchParams.get("username");
+
+ if (!port || !username) {
+ ws.close();
+ return;
+ }
+
+ ws.send("Setting up private SSH key...\n");
+ const privateKey = await setupLocalServerSSHKey();
+
+ if (!privateKey) {
+ ws.close();
+ return;
+ }
+
+ connectionDetails = {
+ host: "localhost",
+ port,
+ username,
+ privateKey,
+ };
+ } else {
+ const server = await findServerById(serverId);
+
+ if (!server) {
+ ws.close();
+ return;
+ }
+
+ const { ipAddress: host, port, username, sshKey, sshKeyId } = server;
+
+ if (!sshKeyId) {
+ throw new Error("No SSH key available for this server");
+ }
+
+ connectionDetails = {
+ host,
+ port,
+ username,
+ privateKey: sshKey?.privateKey,
+ };
}
- if (!server.sshKeyId)
- throw new Error("No SSH key available for this server");
-
const conn = new Client();
let stdout = "";
let stderr = "";
+
+ ws.send("Connecting...\n");
+
conn
.once("ready", () => {
+ // Clear terminal content once connected
+ ws.send("\x1bc");
+
conn.shell({}, (err, stream) => {
if (err) throw err;
@@ -112,18 +162,13 @@ export const setupTerminalWebSocketServer = (
.on("error", (err) => {
if (err.level === "client-authentication") {
ws.send(
- `Authentication failed: Invalid SSH private key. ❌ Error: ${err.message} ${err.level}`,
+ `Authentication failed: Unauthorized ${isLocalServer ? "" : "private SSH key or "}username.\n❌ Error: ${err.message} ${err.level}`,
);
} else {
- ws.send(`SSH connection error: ${err.message}`);
+ ws.send(`SSH connection error: ${err.message} ❌ `);
}
conn.end();
})
- .connect({
- host: server.ipAddress,
- port: server.port,
- username: server.username,
- privateKey: server.sshKey?.privateKey,
- });
+ .connect(connectionDetails);
});
};
diff --git a/apps/dokploy/server/wss/utils.ts b/apps/dokploy/server/wss/utils.ts
index b5567127..9c78869d 100644
--- a/apps/dokploy/server/wss/utils.ts
+++ b/apps/dokploy/server/wss/utils.ts
@@ -1,4 +1,17 @@
+import { execAsync } from "@dokploy/server";
import os from "node:os";
+import path from "node:path";
+import fs from "node:fs";
+
+const HOME_PATH = process.env.HOME || process.env.USERPROFILE || "/";
+
+const LOCAL_SSH_KEY_PATH = path.join(
+ HOME_PATH,
+ ".ssh",
+ "auto_generated-dokploy-local",
+);
+
+const AUTHORIZED_KEYS_PATH = path.join(HOME_PATH, ".ssh", "authorized_keys");
export const getShell = () => {
switch (os.platform()) {
@@ -10,3 +23,40 @@ export const getShell = () => {
return "bash";
}
};
+
+/** Returns private SSH key for dokploy local server terminal. Uses already created SSH key or generates a new SSH key, also automatically appends the public key to `authorized_keys`, creating the file if needed. */
+export const setupLocalServerSSHKey = async () => {
+ try {
+ if (!fs.existsSync(LOCAL_SSH_KEY_PATH)) {
+ // Generate new SSH key if it hasn't been created yet
+ await execAsync(
+ `ssh-keygen -t rsa -b 4096 -f ${LOCAL_SSH_KEY_PATH} -N ""`,
+ );
+ }
+
+ const privateKey = fs.readFileSync(LOCAL_SSH_KEY_PATH, "utf8");
+ const publicKey = fs.readFileSync(`${LOCAL_SSH_KEY_PATH}.pub`, "utf8");
+ const authKeyContent = `${publicKey}\n`;
+
+ if (!fs.existsSync(AUTHORIZED_KEYS_PATH)) {
+ // Create authorized_keys if it doesn't exist yet
+ fs.writeFileSync(AUTHORIZED_KEYS_PATH, authKeyContent, { mode: 0o600 });
+ return privateKey;
+ }
+
+ const existingAuthKeys = fs.readFileSync(AUTHORIZED_KEYS_PATH, "utf8");
+ if (existingAuthKeys.includes(publicKey)) {
+ return privateKey;
+ }
+
+ // Append the public key to authorized_keys
+ fs.appendFileSync(AUTHORIZED_KEYS_PATH, authKeyContent, {
+ mode: 0o600,
+ });
+
+ return privateKey;
+ } catch (error) {
+ console.error("Error getting private SSH key for local terminal:", error);
+ return "";
+ }
+};
diff --git a/apps/dokploy/setup.ts b/apps/dokploy/setup.ts
index e4192ada..5e15db07 100644
--- a/apps/dokploy/setup.ts
+++ b/apps/dokploy/setup.ts
@@ -24,6 +24,6 @@ import {
await initializeRedis();
await initializePostgres();
} catch (e) {
- console.error("Error to setup dokploy", e);
+ console.error("Error in dokploy setup", e);
}
})();
diff --git a/apps/dokploy/styles/globals.css b/apps/dokploy/styles/globals.css
index ab6084e1..5550358e 100644
--- a/apps/dokploy/styles/globals.css
+++ b/apps/dokploy/styles/globals.css
@@ -90,6 +90,10 @@
}
}
+html {
+ scrollbar-gutter: stable both-edges;
+}
+
.xterm-viewport {
border-radius: 0.75rem /* 12px */ !important;
}
diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts
index 917184c5..48840a32 100644
--- a/apps/dokploy/templates/templates.ts
+++ b/apps/dokploy/templates/templates.ts
@@ -1151,4 +1151,19 @@ export const templates: TemplateData[] = [
tags: ["self-hosted", "development"],
load: () => import("./onedev/index").then((m) => m.generate),
},
+ {
+ id: "unifi",
+ name: "Unifi Network",
+ version: "11.6.6",
+ description:
+ "Unifi Network is an open-source enterprise network management platform for wireless networks.",
+ logo: "unifi.webp",
+ links: {
+ github: "https://github.com/ubiquiti",
+ website: "https://www.ui.com/",
+ docs: "https://help.ui.com/hc/en-us/articles/360012282453-Self-Hosting-a-UniFi-Network-Server",
+ },
+ tags: ["self-hosted", "networking"],
+ load: () => import("./unifi/index").then((m) => m.generate),
+ },
];
diff --git a/apps/dokploy/templates/unifi/docker-compose.yml b/apps/dokploy/templates/unifi/docker-compose.yml
new file mode 100644
index 00000000..ee531f67
--- /dev/null
+++ b/apps/dokploy/templates/unifi/docker-compose.yml
@@ -0,0 +1,48 @@
+services:
+ unifi-network-application:
+ image: lscr.io/linuxserver/unifi-network-application:latest
+ environment:
+ - PUID=1000 # User ID
+ - PGID=1000 # Group ID
+ - TZ=Etc/UTC # Timezone
+ - MONGO_HOST=unifi-db
+ - MONGO_USER=unifi
+ - MONGO_PASS=unifi_password
+ - MONGO_PORT=27017
+ - MONGO_DBNAME=unifi
+ - MEM_LIMIT=1024
+ - MEM_STARTUP=1024
+ - MONGO_TLS= #optional # MongoDB TLS setting
+ - MONGO_AUTHSOURCE= #optional # MongoDB authentication source
+ volumes: # Volumes to mount in the container
+ - ../files/config:/config # Map host directory to container directory
+ ports:
+ - 8443:8443 # HTTPS portal
+ # - 3478:3478/udp # STUN service
+ # - 10001:10001/udp # UniFi AP discovery
+ # - 8080:8080 # HTTP portal
+ # - 1900:1900/udp #optional # For DLNA
+ # - 8843:8843 #optional # HTTPS guest portal
+ # - 8880:8880 #optional # HTTP guest portal
+ # - 6789:6789 #optional # Mobile speed test port
+ # - 5514:5514/udp #optional # Remote syslog port
+ restart: unless-stopped
+ depends_on:
+ - unifi-db
+ networks:
+ - dokploy-network
+
+ unifi-db:
+ image: mongo:4.4
+ volumes:
+ - ../files/db/data:/data/db
+ - ../files/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro
+ ports:
+ - 27017
+ restart: unless-stopped
+ networks:
+ - dokploy-network
+
+networks:
+ dokploy-network:
+ external: true
diff --git a/apps/dokploy/templates/unifi/index.ts b/apps/dokploy/templates/unifi/index.ts
new file mode 100644
index 00000000..975ce63d
--- /dev/null
+++ b/apps/dokploy/templates/unifi/index.ts
@@ -0,0 +1,27 @@
+import type { Schema, Template } from "../utils";
+
+export function generate(schema: Schema): Template {
+ const mounts: Template["mounts"] = [
+ {
+ filePath: "init-mongo.sh",
+ content: `
+ #!/bin/bash
+ mongo < {
+ const setLocale = (locale: LanguageCode) => {
Cookies.set("DOKPLOY_LOCALE", locale, { expires: 365 });
window.location.reload();
};
diff --git a/apps/dokploy/utils/i18n.ts b/apps/dokploy/utils/i18n.ts
index 47466d1f..171bf892 100644
--- a/apps/dokploy/utils/i18n.ts
+++ b/apps/dokploy/utils/i18n.ts
@@ -17,7 +17,7 @@ export const serverSideTranslations = (
keySeparator: false,
i18n: {
defaultLocale: "en",
- locales: Object.values(Languages),
+ locales: Object.values(Languages).map(language => language.code),
localeDetection: false,
},
});
diff --git a/packages/server/src/db/reset.ts b/packages/server/src/db/reset.ts
index 7497bec3..c2229147 100644
--- a/packages/server/src/db/reset.ts
+++ b/packages/server/src/db/reset.ts
@@ -15,7 +15,7 @@ const clearDb = async (): Promise => {
console.log(tables);
await pg.end();
} catch (error) {
- console.error("Error to clean database", error);
+ console.error("Error cleaning database", error);
} finally {
}
};
diff --git a/packages/server/src/db/schema/destination.ts b/packages/server/src/db/schema/destination.ts
index 320a3d7c..7d7be614 100644
--- a/packages/server/src/db/schema/destination.ts
+++ b/packages/server/src/db/schema/destination.ts
@@ -82,6 +82,7 @@ export const apiUpdateDestination = createSchema
endpoint: true,
secretAccessKey: true,
destinationId: true,
+ provider: true,
})
.required()
.extend({
diff --git a/packages/server/src/services/admin.ts b/packages/server/src/services/admin.ts
index 2e7c5735..3502395e 100644
--- a/packages/server/src/services/admin.ts
+++ b/packages/server/src/services/admin.ts
@@ -30,7 +30,7 @@ export const createInvitation = async (
if (!result) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the user",
+ message: "Error creating the user",
});
}
const expiresIn24Hours = new Date();
diff --git a/packages/server/src/services/application.ts b/packages/server/src/services/application.ts
index b8ecb88b..e2ed407f 100644
--- a/packages/server/src/services/application.ts
+++ b/packages/server/src/services/application.ts
@@ -86,7 +86,7 @@ export const createApplication = async (
if (!newApplication) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the application",
+ message: "Error creating the application",
});
}
@@ -222,7 +222,7 @@ export const deployApplication = async ({
applicationName: application.name,
applicationType: "application",
// @ts-ignore
- errorMessage: error?.message || "Error to build",
+ errorMessage: error?.message || "Error building",
buildLink,
adminId: application.project.adminId,
});
@@ -352,7 +352,7 @@ export const deployRemoteApplication = async ({
applicationName: application.name,
applicationType: "application",
// @ts-ignore
- errorMessage: error?.message || "Error to build",
+ errorMessage: error?.message || "Error building",
buildLink,
adminId: application.project.adminId,
});
diff --git a/packages/server/src/services/auth.ts b/packages/server/src/services/auth.ts
index 598e39e3..65a01c41 100644
--- a/packages/server/src/services/auth.ts
+++ b/packages/server/src/services/auth.ts
@@ -34,7 +34,7 @@ export const createAdmin = async (input: typeof apiCreateAdmin._type) => {
if (!newAuth) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the user",
+ message: "Error creating the user",
});
}
@@ -68,7 +68,7 @@ export const createUser = async (input: typeof apiCreateUser._type) => {
if (!res) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the user",
+ message: "Error creating the user",
});
}
diff --git a/packages/server/src/services/backup.ts b/packages/server/src/services/backup.ts
index 42cc378a..70e37af4 100644
--- a/packages/server/src/services/backup.ts
+++ b/packages/server/src/services/backup.ts
@@ -19,7 +19,7 @@ export const createBackup = async (input: typeof apiCreateBackup._type) => {
if (!newBackup) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the Backup",
+ message: "Error creating the Backup",
});
}
diff --git a/packages/server/src/services/bitbucket.ts b/packages/server/src/services/bitbucket.ts
index 34aa491f..21807156 100644
--- a/packages/server/src/services/bitbucket.ts
+++ b/packages/server/src/services/bitbucket.ts
@@ -28,7 +28,7 @@ export const createBitbucket = async (
if (!newGitProvider) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the git provider",
+ message: "Error creating the Bitbucket provider",
});
}
diff --git a/packages/server/src/services/compose.ts b/packages/server/src/services/compose.ts
index ff660351..50459c45 100644
--- a/packages/server/src/services/compose.ts
+++ b/packages/server/src/services/compose.ts
@@ -254,7 +254,7 @@ export const deployCompose = async ({
applicationName: compose.name,
applicationType: "compose",
// @ts-ignore
- errorMessage: error?.message || "Error to build",
+ errorMessage: error?.message || "Error building",
buildLink,
adminId: compose.project.adminId,
});
@@ -387,7 +387,7 @@ export const deployRemoteCompose = async ({
applicationName: compose.name,
applicationType: "compose",
// @ts-ignore
- errorMessage: error?.message || "Error to build",
+ errorMessage: error?.message || "Error building",
buildLink,
adminId: compose.project.adminId,
});
diff --git a/packages/server/src/services/deployment.ts b/packages/server/src/services/deployment.ts
index 41adf238..0e55ea32 100644
--- a/packages/server/src/services/deployment.ts
+++ b/packages/server/src/services/deployment.ts
@@ -93,7 +93,7 @@ export const createDeployment = async (
if (deploymentCreate.length === 0 || !deploymentCreate[0]) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the deployment",
+ message: "Error creating the deployment",
});
}
return deploymentCreate[0];
@@ -102,7 +102,7 @@ export const createDeployment = async (
console.log(error);
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the deployment",
+ message: "Error creating the deployment",
});
}
};
@@ -159,7 +159,7 @@ export const createDeploymentPreview = async (
if (deploymentCreate.length === 0 || !deploymentCreate[0]) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the deployment",
+ message: "Error creating the deployment",
});
}
return deploymentCreate[0];
@@ -170,7 +170,7 @@ export const createDeploymentPreview = async (
console.log(error);
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the deployment",
+ message: "Error creating the deployment",
});
}
};
@@ -221,7 +221,7 @@ echo "Initializing deployment" >> ${logFilePath};
if (deploymentCreate.length === 0 || !deploymentCreate[0]) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the deployment",
+ message: "Error creating the deployment",
});
}
return deploymentCreate[0];
@@ -232,7 +232,7 @@ echo "Initializing deployment" >> ${logFilePath};
console.log(error);
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the deployment",
+ message: "Error creating the deployment",
});
}
};
@@ -247,7 +247,7 @@ export const removeDeployment = async (deploymentId: string) => {
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to delete this deployment",
+ message: "Error deleting this deployment",
});
}
};
@@ -497,14 +497,14 @@ export const createServerDeployment = async (
if (deploymentCreate.length === 0 || !deploymentCreate[0]) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the deployment",
+ message: "Error creating the deployment",
});
}
return deploymentCreate[0];
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the deployment",
+ message: "Error creating the deployment",
});
}
};
diff --git a/packages/server/src/services/github.ts b/packages/server/src/services/github.ts
index d60c8353..a5d9d863 100644
--- a/packages/server/src/services/github.ts
+++ b/packages/server/src/services/github.ts
@@ -28,7 +28,7 @@ export const createGithub = async (
if (!newGitProvider) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the git provider",
+ message: "Error creating the Git provider",
});
}
diff --git a/packages/server/src/services/gitlab.ts b/packages/server/src/services/gitlab.ts
index 673cf1f1..8e1362c9 100644
--- a/packages/server/src/services/gitlab.ts
+++ b/packages/server/src/services/gitlab.ts
@@ -29,7 +29,7 @@ export const createGitlab = async (
if (!newGitProvider) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the git provider",
+ message: "Error creating the Git provider",
});
}
diff --git a/packages/server/src/services/mount.ts b/packages/server/src/services/mount.ts
index f5211599..dd7bd3e9 100644
--- a/packages/server/src/services/mount.ts
+++ b/packages/server/src/services/mount.ts
@@ -52,7 +52,7 @@ export const createMount = async (input: typeof apiCreateMount._type) => {
if (!value) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error input: Inserting mount",
+ message: "Error inserting mount",
});
}
@@ -64,7 +64,7 @@ export const createMount = async (input: typeof apiCreateMount._type) => {
console.log(error);
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the mount",
+ message: "Error creating the mount",
cause: error,
});
}
@@ -88,10 +88,10 @@ export const createFileMount = async (mountId: string) => {
await createFile(baseFilePath, mount.filePath || "", mount.content || "");
}
} catch (error) {
- console.log(`Error to create the file mount: ${error}`);
+ console.log(`Error creating the file mount: ${error}`);
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the mount",
+ message: "Error creating the mount",
cause: error,
});
}
diff --git a/packages/server/src/services/preview-deployment.ts b/packages/server/src/services/preview-deployment.ts
index 06bf8fb5..ab38c17c 100644
--- a/packages/server/src/services/preview-deployment.ts
+++ b/packages/server/src/services/preview-deployment.ts
@@ -112,7 +112,7 @@ export const removePreviewDeployment = async (previewDeploymentId: string) => {
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to delete this preview deployment",
+ message: "Error deleting this preview deployment",
});
}
};
@@ -189,7 +189,7 @@ export const createPreviewDeployment = async (
if (!previewDeployment) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the preview deployment",
+ message: "Error creating the preview deployment",
});
}
diff --git a/packages/server/src/services/project.ts b/packages/server/src/services/project.ts
index 47e8ac40..adaa07ea 100644
--- a/packages/server/src/services/project.ts
+++ b/packages/server/src/services/project.ts
@@ -30,7 +30,7 @@ export const createProject = async (
if (!newProject) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the project",
+ message: "Error creating the project",
});
}
diff --git a/packages/server/src/services/redirect.ts b/packages/server/src/services/redirect.ts
index 247b18ce..f16dbe42 100644
--- a/packages/server/src/services/redirect.ts
+++ b/packages/server/src/services/redirect.ts
@@ -40,7 +40,7 @@ export const createRedirect = async (
if (!redirect) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the redirect",
+ message: "Error creating the redirect",
});
}
@@ -53,7 +53,7 @@ export const createRedirect = async (
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create this redirect",
+ message: "Error creating this redirect",
cause: error,
});
}
@@ -82,7 +82,7 @@ export const removeRedirectById = async (redirectId: string) => {
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to remove this redirect",
+ message: "Error removing this redirect",
cause: error,
});
}
@@ -116,7 +116,7 @@ export const updateRedirectById = async (
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to update this redirect",
+ message: "Error updating this redirect",
});
}
};
diff --git a/packages/server/src/services/registry.ts b/packages/server/src/services/registry.ts
index b03c11b9..2bcf3a4a 100644
--- a/packages/server/src/services/registry.ts
+++ b/packages/server/src/services/registry.ts
@@ -71,7 +71,7 @@ export const removeRegistry = async (registryId: string) => {
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to remove this registry",
+ message: "Error removing this registry",
cause: error,
});
}
@@ -114,7 +114,7 @@ export const updateRegistry = async (
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to update this registry",
+ message: "Error updating this registry",
});
}
};
diff --git a/packages/server/src/services/security.ts b/packages/server/src/services/security.ts
index d1709b3f..5efca19f 100644
--- a/packages/server/src/services/security.ts
+++ b/packages/server/src/services/security.ts
@@ -41,7 +41,7 @@ export const createSecurity = async (
if (!securityResponse) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the security",
+ message: "Error creating the security",
});
}
await createSecurityMiddleware(application, securityResponse);
@@ -50,7 +50,7 @@ export const createSecurity = async (
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create this security",
+ message: "Error creating this security",
cause: error,
});
}
@@ -78,7 +78,7 @@ export const deleteSecurityById = async (securityId: string) => {
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to remove this security",
+ message: "Error removing this security",
});
}
};
@@ -100,7 +100,7 @@ export const updateSecurityById = async (
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to update this security",
+ message: "Error updating this security",
});
}
};
diff --git a/packages/server/src/services/server.ts b/packages/server/src/services/server.ts
index 74ba5dd1..081b19fa 100644
--- a/packages/server/src/services/server.ts
+++ b/packages/server/src/services/server.ts
@@ -21,7 +21,7 @@ export const createServer = async (
if (!newServer) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the server",
+ message: "Error creating the server",
});
}
diff --git a/packages/server/src/services/ssh-key.ts b/packages/server/src/services/ssh-key.ts
index 2bf292c7..392f4ecc 100644
--- a/packages/server/src/services/ssh-key.ts
+++ b/packages/server/src/services/ssh-key.ts
@@ -21,7 +21,7 @@ export const createSshKey = async (input: typeof apiCreateSshKey._type) => {
if (!sshKey) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: "Error to create the ssh key",
+ message: "Error creating the SSH Key",
});
}
return sshKey;
diff --git a/packages/server/src/setup/server-setup.ts b/packages/server/src/setup/server-setup.ts
index 57aa7cc3..4fa46c33 100644
--- a/packages/server/src/setup/server-setup.ts
+++ b/packages/server/src/setup/server-setup.ts
@@ -270,20 +270,49 @@ export const setupSwarm = () => `
else
# Get IP address
get_ip() {
- # Try to get IPv4
- local ipv4=\$(curl -4s https://ifconfig.io 2>/dev/null)
+ local ip=""
+
+ # Try IPv4 with multiple services
+ # First attempt: ifconfig.io
+ ip=\$(curl -4s --connect-timeout 5 https://ifconfig.io 2>/dev/null)
+
+ # Second attempt: icanhazip.com
+ if [ -z "\$ip" ]; then
+ ip=\$(curl -4s --connect-timeout 5 https://icanhazip.com 2>/dev/null)
+ fi
+
+ # Third attempt: ipecho.net
+ if [ -z "\$ip" ]; then
+ ip=\$(curl -4s --connect-timeout 5 https://ipecho.net/plain 2>/dev/null)
+ fi
- if [ -n "\$ipv4" ]; then
- echo "\$ipv4"
- else
- # Try to get IPv6
- local ipv6=\$(curl -6s https://ifconfig.io 2>/dev/null)
- if [ -n "\$ipv6" ]; then
- echo "\$ipv6"
+ # If no IPv4, try IPv6 with multiple services
+ if [ -z "\$ip" ]; then
+ # Try IPv6 with ifconfig.io
+ ip=\$(curl -6s --connect-timeout 5 https://ifconfig.io 2>/dev/null)
+
+ # Try IPv6 with icanhazip.com
+ if [ -z "\$ip" ]; then
+ ip=\$(curl -6s --connect-timeout 5 https://icanhazip.com 2>/dev/null)
+ fi
+
+ # Try IPv6 with ipecho.net
+ if [ -z "\$ip" ]; then
+ ip=\$(curl -6s --connect-timeout 5 https://ipecho.net/plain 2>/dev/null)
fi
fi
+
+ if [ -z "\$ip" ]; then
+ echo "Error: Could not determine server IP address automatically (neither IPv4 nor IPv6)." >&2
+ echo "Please set the ADVERTISE_ADDR environment variable manually." >&2
+ echo "Example: export ADVERTISE_ADDR=" >&2
+ exit 1
+ fi
+
+ echo "\$ip"
}
advertise_addr=\$(get_ip)
+ echo "Advertise address: \$advertise_addr"
# Initialize Docker Swarm
docker swarm init --advertise-addr \$advertise_addr
diff --git a/packages/server/src/utils/access-log/handler.ts b/packages/server/src/utils/access-log/handler.ts
index 33c10e51..b1fd925c 100644
--- a/packages/server/src/utils/access-log/handler.ts
+++ b/packages/server/src/utils/access-log/handler.ts
@@ -111,7 +111,7 @@ class LogRotationManager {
);
console.log("USR1 Signal send to Traefik");
} catch (error) {
- console.error("Error to send USR1 Signal to Traefik:", error);
+ console.error("Error sending USR1 Signal to Traefik:", error);
}
}
public async getStatus(): Promise {
diff --git a/packages/server/src/utils/backups/index.ts b/packages/server/src/utils/backups/index.ts
index 6fec7a31..922232a0 100644
--- a/packages/server/src/utils/backups/index.ts
+++ b/packages/server/src/utils/backups/index.ts
@@ -7,7 +7,6 @@ import {
cleanUpSystemPrune,
cleanUpUnusedImages,
} from "../docker/utils";
-import { sendDatabaseBackupNotifications } from "../notifications/database-backup";
import { sendDockerCleanupNotifications } from "../notifications/docker-cleanup";
import { runMariadbBackup } from "./mariadb";
import { runMongoBackup } from "./mongo";
@@ -34,18 +33,18 @@ export const initCronJobs = async () => {
const servers = await getAllServers();
for (const server of servers) {
- const { appName, serverId, enableDockerCleanup } = server;
+ const { serverId, enableDockerCleanup, name } = server;
if (enableDockerCleanup) {
scheduleJob(serverId, "0 0 * * *", async () => {
console.log(
- `SERVER-BACKUP[${new Date().toLocaleString()}] Running Cleanup ${appName}`,
+ `SERVER-BACKUP[${new Date().toLocaleString()}] Running Cleanup ${name}`,
);
await cleanUpUnusedImages(serverId);
await cleanUpDockerBuilder(serverId);
await cleanUpSystemPrune(serverId);
await sendDockerCleanupNotifications(
admin.adminId,
- `Docker cleanup for Server ${appName}`,
+ `Docker cleanup for Server ${name} (${serverId})`,
);
});
}
@@ -53,7 +52,6 @@ export const initCronJobs = async () => {
const pgs = await db.query.postgres.findMany({
with: {
- project: true,
backups: {
with: {
destination: true,
@@ -67,41 +65,23 @@ export const initCronJobs = async () => {
});
for (const pg of pgs) {
for (const backup of pg.backups) {
- const { schedule, backupId, enabled } = backup;
+ const { schedule, backupId, enabled, database } = backup;
if (enabled) {
- try {
- scheduleJob(backupId, schedule, async () => {
- console.log(
- `PG-SERVER[${new Date().toLocaleString()}] Running Backup ${backupId}`,
- );
- runPostgresBackup(pg, backup);
- });
-
- await sendDatabaseBackupNotifications({
- applicationName: pg.name,
- projectName: pg.project.name,
- databaseType: "postgres",
- type: "success",
- adminId: pg.project.adminId,
- });
- } catch (error) {
- await sendDatabaseBackupNotifications({
- applicationName: pg.name,
- projectName: pg.project.name,
- databaseType: "postgres",
- type: "error",
- // @ts-ignore
- errorMessage: error?.message || "Error message not provided",
- adminId: pg.project.adminId,
- });
- }
+ console.log(
+ `[Backup] Postgres DB ${pg.name} for ${database} Activated`,
+ );
+ scheduleJob(backupId, schedule, async () => {
+ console.log(
+ `PG-SERVER[${new Date().toLocaleString()}] Running Backup ${backupId}`,
+ );
+ runPostgresBackup(pg, backup);
+ });
}
}
}
const mariadbs = await db.query.mariadb.findMany({
with: {
- project: true,
backups: {
with: {
destination: true,
@@ -116,40 +96,23 @@ export const initCronJobs = async () => {
for (const maria of mariadbs) {
for (const backup of maria.backups) {
- const { schedule, backupId, enabled } = backup;
+ const { schedule, backupId, enabled, database } = backup;
if (enabled) {
- try {
- scheduleJob(backupId, schedule, async () => {
- console.log(
- `MARIADB-SERVER[${new Date().toLocaleString()}] Running Backup ${backupId}`,
- );
- await runMariadbBackup(maria, backup);
- });
- await sendDatabaseBackupNotifications({
- applicationName: maria.name,
- projectName: maria.project.name,
- databaseType: "mariadb",
- type: "success",
- adminId: maria.project.adminId,
- });
- } catch (error) {
- await sendDatabaseBackupNotifications({
- applicationName: maria.name,
- projectName: maria.project.name,
- databaseType: "mariadb",
- type: "error",
- // @ts-ignore
- errorMessage: error?.message || "Error message not provided",
- adminId: maria.project.adminId,
- });
- }
+ console.log(
+ `[Backup] MariaDB DB ${maria.name} for ${database} Activated`,
+ );
+ scheduleJob(backupId, schedule, async () => {
+ console.log(
+ `MARIADB-SERVER[${new Date().toLocaleString()}] Running Backup ${backupId}`,
+ );
+ await runMariadbBackup(maria, backup);
+ });
}
}
}
const mongodbs = await db.query.mongo.findMany({
with: {
- project: true,
backups: {
with: {
destination: true,
@@ -166,38 +129,19 @@ export const initCronJobs = async () => {
for (const backup of mongo.backups) {
const { schedule, backupId, enabled } = backup;
if (enabled) {
- try {
- scheduleJob(backupId, schedule, async () => {
- console.log(
- `MONGO-SERVER[${new Date().toLocaleString()}] Running Backup ${backupId}`,
- );
- await runMongoBackup(mongo, backup);
- });
- await sendDatabaseBackupNotifications({
- applicationName: mongo.name,
- projectName: mongo.project.name,
- databaseType: "mongodb",
- type: "success",
- adminId: mongo.project.adminId,
- });
- } catch (error) {
- await sendDatabaseBackupNotifications({
- applicationName: mongo.name,
- projectName: mongo.project.name,
- databaseType: "mongodb",
- type: "error",
- // @ts-ignore
- errorMessage: error?.message || "Error message not provided",
- adminId: mongo.project.adminId,
- });
- }
+ console.log(`[Backup] MongoDB DB ${mongo.name} Activated`);
+ scheduleJob(backupId, schedule, async () => {
+ console.log(
+ `MONGO-SERVER[${new Date().toLocaleString()}] Running Backup ${backupId}`,
+ );
+ await runMongoBackup(mongo, backup);
+ });
}
}
}
const mysqls = await db.query.mysql.findMany({
with: {
- project: true,
backups: {
with: {
destination: true,
@@ -214,31 +158,13 @@ export const initCronJobs = async () => {
for (const backup of mysql.backups) {
const { schedule, backupId, enabled } = backup;
if (enabled) {
- try {
- scheduleJob(backupId, schedule, async () => {
- console.log(
- `MYSQL-SERVER[${new Date().toLocaleString()}] Running Backup ${backupId}`,
- );
- await runMySqlBackup(mysql, backup);
- });
- await sendDatabaseBackupNotifications({
- applicationName: mysql.name,
- projectName: mysql.project.name,
- databaseType: "mysql",
- type: "success",
- adminId: mysql.project.adminId,
- });
- } catch (error) {
- await sendDatabaseBackupNotifications({
- applicationName: mysql.name,
- projectName: mysql.project.name,
- databaseType: "mysql",
- type: "error",
- // @ts-ignore
- errorMessage: error?.message || "Error message not provided",
- adminId: mysql.project.adminId,
- });
- }
+ console.log(`[Backup] MySQL DB ${mysql.name} Activated`);
+ scheduleJob(backupId, schedule, async () => {
+ console.log(
+ `MYSQL-SERVER[${new Date().toLocaleString()}] Running Backup ${backupId}`,
+ );
+ await runMySqlBackup(mysql, backup);
+ });
}
}
}
diff --git a/packages/server/src/utils/filesystem/directory.ts b/packages/server/src/utils/filesystem/directory.ts
index 0a28cbac..adf25097 100644
--- a/packages/server/src/utils/filesystem/directory.ts
+++ b/packages/server/src/utils/filesystem/directory.ts
@@ -39,7 +39,7 @@ export const removeFileOrDirectory = async (path: string) => {
try {
await execAsync(`rm -rf ${path}`);
} catch (error) {
- console.error(`Error to remove ${path}: ${error}`);
+ console.error(`Error removing ${path}: ${error}`);
throw error;
}
};
@@ -58,7 +58,7 @@ export const removeDirectoryCode = async (
await execAsync(command);
}
} catch (error) {
- console.error(`Error to remove ${directoryPath}: ${error}`);
+ console.error(`Error removing ${directoryPath}: ${error}`);
throw error;
}
};
@@ -77,7 +77,7 @@ export const removeComposeDirectory = async (
await execAsync(command);
}
} catch (error) {
- console.error(`Error to remove ${directoryPath}: ${error}`);
+ console.error(`Error removing ${directoryPath}: ${error}`);
throw error;
}
};
@@ -96,7 +96,7 @@ export const removeMonitoringDirectory = async (
await execAsync(command);
}
} catch (error) {
- console.error(`Error to remove ${directoryPath}: ${error}`);
+ console.error(`Error removing ${directoryPath}: ${error}`);
throw error;
}
};
diff --git a/packages/server/src/wss/utils.ts b/packages/server/src/wss/utils.ts
index 8c6217a2..9ed75c3a 100644
--- a/packages/server/src/wss/utils.ts
+++ b/packages/server/src/wss/utils.ts
@@ -19,7 +19,7 @@ export const getPublicIpWithFallback = async () => {
ip = await publicIpv4();
} catch (error) {
console.log(
- "Error to obtain public IPv4 address, falling back to IPv6",
+ "Error obtaining public IPv4 address, falling back to IPv6",
// @ts-ignore
error.message,
);
@@ -27,7 +27,7 @@ export const getPublicIpWithFallback = async () => {
ip = await publicIpv6();
} catch (error) {
// @ts-ignore
- console.error("Error to obtain public IPv6 address", error.message);
+ console.error("Error obtaining public IPv6 address", error.message);
ip = null;
}
}