mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge branch 'canary' into 139-multi-server-feature
This commit is contained in:
@@ -29,7 +29,7 @@ We have tested on the following Linux Distros:
|
|||||||
|
|
||||||
### Providers
|
### Providers
|
||||||
|
|
||||||
- [Hostinger](https://www.hostinger.com/vps-hosting?ref=dokploy) Get 20% Discount using this referral link: [Referral Link](https://hostinger.com?REFERRALCODE=1SIUMAURICI97)
|
- [Hostinger](https://www.hostinger.com/vps-hosting?ref=dokploy) Get 20% Discount using this referral link: [Referral Link](https://www.hostinger.com/vps-hosting?REFERRALCODE=1SIUMAURICI97)
|
||||||
- [DigitalOcean](https://www.digitalocean.com/pricing/droplets#basic-droplets) Get 200$ credits for free with this referral link: [Referral Link](https://m.do.co/c/db24efd43f35)
|
- [DigitalOcean](https://www.digitalocean.com/pricing/droplets#basic-droplets) Get 200$ credits for free with this referral link: [Referral Link](https://m.do.co/c/db24efd43f35)
|
||||||
- [Hetzner](https://www.hetzner.com/cloud/) Get 20€ credits for free with this referral link: [Referral Link](https://hetzner.cloud/?ref=vou4fhxJ1W2D)
|
- [Hetzner](https://www.hetzner.com/cloud/) Get 20€ credits for free with this referral link: [Referral Link](https://hetzner.cloud/?ref=vou4fhxJ1W2D)
|
||||||
- [Linode](https://www.linode.com/es/pricing/#compute-shared)
|
- [Linode](https://www.linode.com/es/pricing/#compute-shared)
|
||||||
|
|||||||
@@ -81,7 +81,10 @@ export const ShowClusterSettings = ({ applicationId }: Props) => {
|
|||||||
const onSubmit = async (data: AddCommand) => {
|
const onSubmit = async (data: AddCommand) => {
|
||||||
await mutateAsync({
|
await mutateAsync({
|
||||||
applicationId,
|
applicationId,
|
||||||
registryId: data?.registryId === "none" ? null : data?.registryId,
|
registryId:
|
||||||
|
data?.registryId === "none" || !data?.registryId
|
||||||
|
? null
|
||||||
|
: data?.registryId,
|
||||||
replicas: data?.replicas,
|
replicas: data?.replicas,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
|||||||
@@ -109,9 +109,9 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-7xl p-0">
|
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-7xl p-0">
|
||||||
<div className="sticky top-0 z-10 flex flex-col gap-4 bg-background p-6 border-b">
|
<div className="sticky top-0 z-10 flex flex-col gap-4 bg-background p-6 border-b">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Create Template</DialogTitle>
|
<DialogTitle>Create from Template</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
Deploy a open source template to your project
|
Create an open source application from a template
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
|
{isError && <AlertBlock type="error">{error?.message}</AlertBlock>}
|
||||||
@@ -274,7 +274,7 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
<AlertDialog>
|
<AlertDialog>
|
||||||
<AlertDialogTrigger asChild>
|
<AlertDialogTrigger asChild>
|
||||||
<Button onSelect={(e) => e.preventDefault()}>
|
<Button onSelect={(e) => e.preventDefault()}>
|
||||||
Deploy
|
Create
|
||||||
</Button>
|
</Button>
|
||||||
</AlertDialogTrigger>
|
</AlertDialogTrigger>
|
||||||
<AlertDialogContent>
|
<AlertDialogContent>
|
||||||
@@ -283,8 +283,9 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
Are you absolutely sure?
|
Are you absolutely sure?
|
||||||
</AlertDialogTitle>
|
</AlertDialogTitle>
|
||||||
<AlertDialogDescription>
|
<AlertDialogDescription>
|
||||||
This will deploy {template.name} template to
|
This will create an application from the{" "}
|
||||||
your project.
|
{template.name} template and add it to your
|
||||||
|
project.
|
||||||
</AlertDialogDescription>
|
</AlertDialogDescription>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dokploy",
|
"name": "dokploy",
|
||||||
"version": "v0.8.1",
|
"version": "v0.8.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export const domainRouter = createTRPCRouter({
|
|||||||
.input(apiCreateDomain)
|
.input(apiCreateDomain)
|
||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
try {
|
try {
|
||||||
await createDomain(input);
|
return await createDomain(input);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "BAD_REQUEST",
|
code: "BAD_REQUEST",
|
||||||
|
|||||||
@@ -424,18 +424,28 @@ export const settingsRouter = createTRPCRouter({
|
|||||||
return false;
|
return false;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
readStatsLogs: adminProcedure.input(apiReadStatsLogs).query(({ input }) => {
|
readStatsLogs: adminProcedure
|
||||||
const rawConfig = readMonitoringConfig();
|
.meta({
|
||||||
const parsedConfig = parseRawConfig(
|
openapi: {
|
||||||
rawConfig as string,
|
path: "/read-stats-logs",
|
||||||
input.page,
|
method: "POST",
|
||||||
input.sort,
|
override: true,
|
||||||
input.search,
|
enabled: false,
|
||||||
input.status,
|
},
|
||||||
);
|
})
|
||||||
|
.input(apiReadStatsLogs)
|
||||||
|
.query(({ input }) => {
|
||||||
|
const rawConfig = readMonitoringConfig();
|
||||||
|
const parsedConfig = parseRawConfig(
|
||||||
|
rawConfig as string,
|
||||||
|
input.page,
|
||||||
|
input.sort,
|
||||||
|
input.search,
|
||||||
|
input.status,
|
||||||
|
);
|
||||||
|
|
||||||
return parsedConfig;
|
return parsedConfig;
|
||||||
}),
|
}),
|
||||||
readStats: adminProcedure.query(() => {
|
readStats: adminProcedure.query(() => {
|
||||||
const rawConfig = readMonitoringConfig();
|
const rawConfig = readMonitoringConfig();
|
||||||
const processedLogs = processLogs(rawConfig as string);
|
const processedLogs = processLogs(rawConfig as string);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { findServerById } from "./server";
|
|||||||
export type Domain = typeof domains.$inferSelect;
|
export type Domain = typeof domains.$inferSelect;
|
||||||
|
|
||||||
export const createDomain = async (input: typeof apiCreateDomain._type) => {
|
export const createDomain = async (input: typeof apiCreateDomain._type) => {
|
||||||
await db.transaction(async (tx) => {
|
const result = await db.transaction(async (tx) => {
|
||||||
const domain = await tx
|
const domain = await tx
|
||||||
.insert(domains)
|
.insert(domains)
|
||||||
.values({
|
.values({
|
||||||
@@ -23,7 +23,7 @@ export const createDomain = async (input: typeof apiCreateDomain._type) => {
|
|||||||
if (!domain) {
|
if (!domain) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "BAD_REQUEST",
|
code: "BAD_REQUEST",
|
||||||
message: "Error to create the domain",
|
message: "Error creating domain",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,7 +31,11 @@ export const createDomain = async (input: typeof apiCreateDomain._type) => {
|
|||||||
const application = await findApplicationById(domain.applicationId);
|
const application = await findApplicationById(domain.applicationId);
|
||||||
await manageDomain(application, domain);
|
await manageDomain(application, domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return domain;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const generateTraefikMeDomain = async (
|
export const generateTraefikMeDomain = async (
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ Compose Type: ${composeType} ✅`;
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
cwd: projectPath,
|
cwd: projectPath,
|
||||||
|
env: {
|
||||||
|
NODE_ENV: process.env.NODE_ENV,
|
||||||
|
PATH: process.env.PATH,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user