mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: set the registry url in image in case we have a registry asociated
This commit is contained in:
@@ -41,7 +41,7 @@ export const ShowCluster = () => {
|
|||||||
{worker.Spec.Availability}
|
{worker.Spec.Availability}
|
||||||
</span>
|
</span>
|
||||||
<span className="text-sm text-muted-foreground">
|
<span className="text-sm text-muted-foreground">
|
||||||
{worker.ManagerStatus.Reachability}
|
{worker?.ManagerStatus?.Reachability || "-"}
|
||||||
</span>
|
</span>
|
||||||
<span className="text-sm text-muted-foreground">
|
<span className="text-sm text-muted-foreground">
|
||||||
{worker?.Spec?.Role}
|
{worker?.Spec?.Role}
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ export default function Custom404({ statusCode }: Props) {
|
|||||||
<div className="container mx-auto h-screen items-center justify-center flex">
|
<div className="container mx-auto h-screen items-center justify-center flex">
|
||||||
<div className="-mx-4 flex">
|
<div className="-mx-4 flex">
|
||||||
<div className="w-full px-4">
|
<div className="w-full px-4">
|
||||||
<div className="mx-auto max-w-[400px] text-center">
|
<div className="mx-auto max-w-[700px] text-center">
|
||||||
<h2 className="mb-2 text-[50px] font-bold leading-none text-white sm:text-[80px] md:text-[100px]">
|
<h2 className="mb-2 text-[50px] font-bold leading-none text-white sm:text-[80px]">
|
||||||
{statusCode
|
{statusCode
|
||||||
? `An error ${statusCode} occurred on server`
|
? `An error ${statusCode} occurred on server`
|
||||||
: "An error occurred on client"}
|
: "An error occurred on client"}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ export const registryRouter = createTRPCRouter({
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -238,3 +238,4 @@ export const settingsRouter = createTRPCRouter({
|
|||||||
return readConfigInPath(input.path);
|
return readConfigInPath(input.path);
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
// apt-get install apache2-utils
|
||||||
|
|||||||
@@ -81,16 +81,31 @@ export const mechanizeDockerContainer = async (
|
|||||||
cpuLimit,
|
cpuLimit,
|
||||||
cpuReservation,
|
cpuReservation,
|
||||||
});
|
});
|
||||||
|
|
||||||
const volumesMount = generateVolumeMounts(mounts);
|
const volumesMount = generateVolumeMounts(mounts);
|
||||||
const bindsMount = generateBindMounts(mounts);
|
const bindsMount = generateBindMounts(mounts);
|
||||||
const filesMount = generateFileMounts(appName, mounts);
|
const filesMount = generateFileMounts(appName, mounts);
|
||||||
const envVariables = prepareEnvironmentVariables(env);
|
const envVariables = prepareEnvironmentVariables(env);
|
||||||
|
|
||||||
|
const registry = application.registry;
|
||||||
|
|
||||||
|
const image =
|
||||||
|
sourceType === "docker"
|
||||||
|
? dockerImage!
|
||||||
|
: registry
|
||||||
|
? `${registry.registryUrl}/${appName}`
|
||||||
|
: `${appName}:latest`;
|
||||||
|
|
||||||
const settings: CreateServiceOptions = {
|
const settings: CreateServiceOptions = {
|
||||||
|
authconfig: {
|
||||||
|
password: registry?.password || "",
|
||||||
|
username: registry?.username || "",
|
||||||
|
serveraddress: registry?.registryUrl || "",
|
||||||
|
},
|
||||||
Name: appName,
|
Name: appName,
|
||||||
TaskTemplate: {
|
TaskTemplate: {
|
||||||
ContainerSpec: {
|
ContainerSpec: {
|
||||||
Image: sourceType === "docker" ? dockerImage! : `${appName}:latest`,
|
Image: image,
|
||||||
Env: envVariables,
|
Env: envVariables,
|
||||||
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
|
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
|
||||||
...(command
|
...(command
|
||||||
|
|||||||
Reference in New Issue
Block a user