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}
|
||||
</span>
|
||||
<span className="text-sm text-muted-foreground">
|
||||
{worker.ManagerStatus.Reachability}
|
||||
{worker?.ManagerStatus?.Reachability || "-"}
|
||||
</span>
|
||||
<span className="text-sm text-muted-foreground">
|
||||
{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="-mx-4 flex">
|
||||
<div className="w-full px-4">
|
||||
<div className="mx-auto max-w-[400px] text-center">
|
||||
<h2 className="mb-2 text-[50px] font-bold leading-none text-white sm:text-[80px] md:text-[100px]">
|
||||
<div className="mx-auto max-w-[700px] text-center">
|
||||
<h2 className="mb-2 text-[50px] font-bold leading-none text-white sm:text-[80px]">
|
||||
{statusCode
|
||||
? `An error ${statusCode} occurred on server`
|
||||
: "An error occurred on client"}
|
||||
|
||||
@@ -64,6 +64,7 @@ export const registryRouter = createTRPCRouter({
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return false;
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -238,3 +238,4 @@ export const settingsRouter = createTRPCRouter({
|
||||
return readConfigInPath(input.path);
|
||||
}),
|
||||
});
|
||||
// apt-get install apache2-utils
|
||||
|
||||
@@ -81,16 +81,31 @@ export const mechanizeDockerContainer = async (
|
||||
cpuLimit,
|
||||
cpuReservation,
|
||||
});
|
||||
|
||||
const volumesMount = generateVolumeMounts(mounts);
|
||||
const bindsMount = generateBindMounts(mounts);
|
||||
const filesMount = generateFileMounts(appName, mounts);
|
||||
const envVariables = prepareEnvironmentVariables(env);
|
||||
|
||||
const registry = application.registry;
|
||||
|
||||
const image =
|
||||
sourceType === "docker"
|
||||
? dockerImage!
|
||||
: registry
|
||||
? `${registry.registryUrl}/${appName}`
|
||||
: `${appName}:latest`;
|
||||
|
||||
const settings: CreateServiceOptions = {
|
||||
authconfig: {
|
||||
password: registry?.password || "",
|
||||
username: registry?.username || "",
|
||||
serveraddress: registry?.registryUrl || "",
|
||||
},
|
||||
Name: appName,
|
||||
TaskTemplate: {
|
||||
ContainerSpec: {
|
||||
Image: sourceType === "docker" ? dockerImage! : `${appName}:latest`,
|
||||
Image: image,
|
||||
Env: envVariables,
|
||||
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
|
||||
...(command
|
||||
|
||||
Reference in New Issue
Block a user