Merge branch 'Dokploy:canary' into canary

This commit is contained in:
Oleksandr Honcharov
2024-09-21 00:33:00 +03:00
committed by GitHub
5 changed files with 13 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "dokploy",
"version": "v0.8.2",
"version": "v0.8.3",
"private": true,
"license": "Apache-2.0",
"type": "module",

View File

@@ -27,7 +27,7 @@ export const domainRouter = createTRPCRouter({
.input(apiCreateDomain)
.mutation(async ({ input }) => {
try {
await createDomain(input);
return await createDomain(input);
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",

View File

@@ -14,7 +14,7 @@ import { findApplicationById } from "./application";
export type Domain = typeof domains.$inferSelect;
export const createDomain = async (input: typeof apiCreateDomain._type) => {
await db.transaction(async (tx) => {
const result = await db.transaction(async (tx) => {
const domain = await tx
.insert(domains)
.values({
@@ -26,7 +26,7 @@ export const createDomain = async (input: typeof apiCreateDomain._type) => {
if (!domain) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the domain",
message: "Error creating domain",
});
}
@@ -34,7 +34,11 @@ export const createDomain = async (input: typeof apiCreateDomain._type) => {
const application = await findApplicationById(domain.applicationId);
await manageDomain(application, domain);
}
return domain;
});
return result;
};
export const generateTraefikMeDomain = async (appName: string) => {

View File

@@ -53,6 +53,10 @@ Compose Type: ${composeType} ✅`;
},
{
cwd: projectPath,
env: {
NODE_ENV: process.env.NODE_ENV,
PATH: process.env.PATH,
},
},
);