mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: lint
This commit is contained in:
@@ -16,7 +16,7 @@ const Terminal = dynamic(
|
|||||||
() => import("./docker-terminal").then((e) => e.DockerTerminal),
|
() => import("./docker-terminal").then((e) => e.DockerTerminal),
|
||||||
{
|
{
|
||||||
ssr: false,
|
ssr: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -75,7 +75,9 @@ export const DockerTerminalModal = ({
|
|||||||
<Dialog open={confirmDialogOpen} onOpenChange={setConfirmDialogOpen}>
|
<Dialog open={confirmDialogOpen} onOpenChange={setConfirmDialogOpen}>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Are you sure you want to close the terminal?</DialogTitle>
|
<DialogTitle>
|
||||||
|
Are you sure you want to close the terminal?
|
||||||
|
</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
By clicking the confirm button, the terminal will be closed.
|
By clicking the confirm button, the terminal will be closed.
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ import {
|
|||||||
SelectTrigger,
|
SelectTrigger,
|
||||||
SelectValue,
|
SelectValue,
|
||||||
} from "@/components/ui/select";
|
} from "@/components/ui/select";
|
||||||
|
import { Languages } from "@/lib/languages";
|
||||||
import useLocale from "@/utils/hooks/use-locale";
|
import useLocale from "@/utils/hooks/use-locale";
|
||||||
import { useTranslation } from "next-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import { Languages } from "@/lib/languages";
|
|
||||||
|
|
||||||
const appearanceFormSchema = z.object({
|
const appearanceFormSchema = z.object({
|
||||||
theme: z.enum(["light", "dark", "system"], {
|
theme: z.enum(["light", "dark", "system"], {
|
||||||
|
|||||||
@@ -27,11 +27,11 @@ import { useEffect, useState } from "react";
|
|||||||
const Terminal = dynamic(
|
const Terminal = dynamic(
|
||||||
() =>
|
() =>
|
||||||
import("@/components/dashboard/docker/terminal/docker-terminal").then(
|
import("@/components/dashboard/docker/terminal/docker-terminal").then(
|
||||||
(e) => e.DockerTerminal
|
(e) => e.DockerTerminal,
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
ssr: false,
|
ssr: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -48,7 +48,7 @@ export const DockerTerminalModal = ({ children, appName, serverId }: Props) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: !!appName,
|
enabled: !!appName,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
const [containerId, setContainerId] = useState<string | undefined>();
|
const [containerId, setContainerId] = useState<string | undefined>();
|
||||||
const [mainDialogOpen, setMainDialogOpen] = useState(false);
|
const [mainDialogOpen, setMainDialogOpen] = useState(false);
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
/** @type {import('next-i18next').UserConfig} */
|
/** @type {import('next-i18next').UserConfig} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
fallbackLng: "en",
|
fallbackLng: "en",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import "@/styles/globals.css";
|
import "@/styles/globals.css";
|
||||||
|
|
||||||
import { Toaster } from "@/components/ui/sonner";
|
import { Toaster } from "@/components/ui/sonner";
|
||||||
|
import { Languages } from "@/lib/languages";
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
import type { NextPage } from "next";
|
import type { NextPage } from "next";
|
||||||
import { appWithTranslation } from "next-i18next";
|
import { appWithTranslation } from "next-i18next";
|
||||||
@@ -10,7 +11,6 @@ import { Inter } from "next/font/google";
|
|||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
import Script from "next/script";
|
import Script from "next/script";
|
||||||
import type { ReactElement, ReactNode } from "react";
|
import type { ReactElement, ReactNode } from "react";
|
||||||
import { Languages } from "@/lib/languages";
|
|
||||||
|
|
||||||
const inter = Inter({ subsets: ["latin"] });
|
const inter = Inter({ subsets: ["latin"] });
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { extractCommitMessage, extractHash } from "./[refreshToken]";
|
|||||||
|
|
||||||
export default async function handler(
|
export default async function handler(
|
||||||
req: NextApiRequest,
|
req: NextApiRequest,
|
||||||
res: NextApiResponse
|
res: NextApiResponse,
|
||||||
) {
|
) {
|
||||||
const signature = req.headers["x-hub-signature-256"];
|
const signature = req.headers["x-hub-signature-256"];
|
||||||
const githubBody = req.body;
|
const githubBody = req.body;
|
||||||
@@ -40,7 +40,7 @@ export default async function handler(
|
|||||||
|
|
||||||
const verified = await webhooks.verify(
|
const verified = await webhooks.verify(
|
||||||
JSON.stringify(githubBody),
|
JSON.stringify(githubBody),
|
||||||
signature as string
|
signature as string,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!verified) {
|
if (!verified) {
|
||||||
@@ -65,14 +65,13 @@ export default async function handler(
|
|||||||
const deploymentHash = extractHash(req.headers, req.body);
|
const deploymentHash = extractHash(req.headers, req.body);
|
||||||
const owner = githubBody?.repository?.owner?.name;
|
const owner = githubBody?.repository?.owner?.name;
|
||||||
|
|
||||||
|
|
||||||
const apps = await db.query.applications.findMany({
|
const apps = await db.query.applications.findMany({
|
||||||
where: and(
|
where: and(
|
||||||
eq(applications.sourceType, "github"),
|
eq(applications.sourceType, "github"),
|
||||||
eq(applications.autoDeploy, true),
|
eq(applications.autoDeploy, true),
|
||||||
eq(applications.branch, branchName),
|
eq(applications.branch, branchName),
|
||||||
eq(applications.repository, repository),
|
eq(applications.repository, repository),
|
||||||
eq(applications.owner, owner)
|
eq(applications.owner, owner),
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -97,7 +96,7 @@ export default async function handler(
|
|||||||
{
|
{
|
||||||
removeOnComplete: true,
|
removeOnComplete: true,
|
||||||
removeOnFail: true,
|
removeOnFail: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,7 +106,7 @@ export default async function handler(
|
|||||||
eq(compose.autoDeploy, true),
|
eq(compose.autoDeploy, true),
|
||||||
eq(compose.branch, branchName),
|
eq(compose.branch, branchName),
|
||||||
eq(compose.repository, repository),
|
eq(compose.repository, repository),
|
||||||
eq(compose.owner, owner)
|
eq(compose.owner, owner),
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -133,7 +132,7 @@ export default async function handler(
|
|||||||
{
|
{
|
||||||
removeOnComplete: true,
|
removeOnComplete: true,
|
||||||
removeOnFail: true,
|
removeOnFail: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ export const notificationRouter = createTRPCRouter({
|
|||||||
await sendDiscordNotification(input, {
|
await sendDiscordNotification(input, {
|
||||||
title: "> `🤚` - Test Notification",
|
title: "> `🤚` - Test Notification",
|
||||||
description: "> Hi, From Dokploy 👋",
|
description: "> Hi, From Dokploy 👋",
|
||||||
color: 0xf3f7f4
|
color: 0xf3f7f4,
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -29,61 +29,61 @@ export function generate(schema: Schema): Template {
|
|||||||
];
|
];
|
||||||
|
|
||||||
const envs = [
|
const envs = [
|
||||||
`NODE_ENV=production`,
|
"NODE_ENV=production",
|
||||||
`RUNTIME_PLATFORM=docker-compose`,
|
"RUNTIME_PLATFORM=docker-compose",
|
||||||
`V3_ENABLED=true`,
|
"V3_ENABLED=true",
|
||||||
|
|
||||||
`# Domain configuration`,
|
"# Domain configuration",
|
||||||
`TRIGGER_DOMAIN=${triggerDomain}`,
|
`TRIGGER_DOMAIN=${triggerDomain}`,
|
||||||
`TRIGGER_PROTOCOL=http`,
|
"TRIGGER_PROTOCOL=http",
|
||||||
|
|
||||||
`# Database configuration with secure credentials`,
|
"# Database configuration with secure credentials",
|
||||||
`POSTGRES_USER=${dbUser}`,
|
`POSTGRES_USER=${dbUser}`,
|
||||||
`POSTGRES_PASSWORD=${dbPassword}`,
|
`POSTGRES_PASSWORD=${dbPassword}`,
|
||||||
`POSTGRES_DB=${dbName}`,
|
`POSTGRES_DB=${dbName}`,
|
||||||
`DATABASE_URL=postgresql://${dbUser}:${dbPassword}@postgres:5432/${dbName}`,
|
`DATABASE_URL=postgresql://${dbUser}:${dbPassword}@postgres:5432/${dbName}`,
|
||||||
|
|
||||||
`# Secrets`,
|
"# Secrets",
|
||||||
`MAGIC_LINK_SECRET=${magicLinkSecret}`,
|
`MAGIC_LINK_SECRET=${magicLinkSecret}`,
|
||||||
`SESSION_SECRET=${sessionSecret}`,
|
`SESSION_SECRET=${sessionSecret}`,
|
||||||
`ENCRYPTION_KEY=${encryptionKey}`,
|
`ENCRYPTION_KEY=${encryptionKey}`,
|
||||||
`PROVIDER_SECRET=${providerSecret}`,
|
`PROVIDER_SECRET=${providerSecret}`,
|
||||||
`COORDINATOR_SECRET=${coordinatorSecret}`,
|
`COORDINATOR_SECRET=${coordinatorSecret}`,
|
||||||
|
|
||||||
`# TRIGGER_TELEMETRY_DISABLED=1`,
|
"# TRIGGER_TELEMETRY_DISABLED=1",
|
||||||
`INTERNAL_OTEL_TRACE_DISABLED=1`,
|
"INTERNAL_OTEL_TRACE_DISABLED=1",
|
||||||
`INTERNAL_OTEL_TRACE_LOGGING_ENABLED=0`,
|
"INTERNAL_OTEL_TRACE_LOGGING_ENABLED=0",
|
||||||
|
|
||||||
`DEFAULT_ORG_EXECUTION_CONCURRENCY_LIMIT=300`,
|
"DEFAULT_ORG_EXECUTION_CONCURRENCY_LIMIT=300",
|
||||||
`DEFAULT_ENV_EXECUTION_CONCURRENCY_LIMIT=100`,
|
"DEFAULT_ENV_EXECUTION_CONCURRENCY_LIMIT=100",
|
||||||
|
|
||||||
`DIRECT_URL=\${DATABASE_URL}`,
|
"DIRECT_URL=${DATABASE_URL}",
|
||||||
`REDIS_HOST=redis`,
|
"REDIS_HOST=redis",
|
||||||
`REDIS_PORT=6379`,
|
"REDIS_PORT=6379",
|
||||||
`REDIS_TLS_DISABLED=true`,
|
"REDIS_TLS_DISABLED=true",
|
||||||
|
|
||||||
`# If this is set, emails that are not specified won't be able to log in`,
|
"# If this is set, emails that are not specified won't be able to log in",
|
||||||
`# WHITELISTED_EMAILS="authorized@yahoo.com|authorized@gmail.com"`,
|
'# WHITELISTED_EMAILS="authorized@yahoo.com|authorized@gmail.com"',
|
||||||
`# Accounts with these emails will become admins when signing up and get access to the admin panel`,
|
"# Accounts with these emails will become admins when signing up and get access to the admin panel",
|
||||||
`# ADMIN_EMAILS="admin@example.com|another-admin@example.com"`,
|
'# ADMIN_EMAILS="admin@example.com|another-admin@example.com"',
|
||||||
|
|
||||||
`# If this is set, your users will be able to log in via GitHub`,
|
"# If this is set, your users will be able to log in via GitHub",
|
||||||
`# AUTH_GITHUB_CLIENT_ID=`,
|
"# AUTH_GITHUB_CLIENT_ID=",
|
||||||
`# AUTH_GITHUB_CLIENT_SECRET=`,
|
"# AUTH_GITHUB_CLIENT_SECRET=",
|
||||||
|
|
||||||
`# E-mail settings`,
|
"# E-mail settings",
|
||||||
`# Ensure the FROM_EMAIL matches what you setup with Resend.com`,
|
"# Ensure the FROM_EMAIL matches what you setup with Resend.com",
|
||||||
`# If these are not set, emails will be printed to the console`,
|
"# If these are not set, emails will be printed to the console",
|
||||||
`# FROM_EMAIL=`,
|
"# FROM_EMAIL=",
|
||||||
`# REPLY_TO_EMAIL=`,
|
"# REPLY_TO_EMAIL=",
|
||||||
`# RESEND_API_KEY=`,
|
"# RESEND_API_KEY=",
|
||||||
|
|
||||||
`# Worker settings`,
|
"# Worker settings",
|
||||||
`HTTP_SERVER_PORT=9020`,
|
"HTTP_SERVER_PORT=9020",
|
||||||
`COORDINATOR_HOST=127.0.0.1`,
|
"COORDINATOR_HOST=127.0.0.1",
|
||||||
`COORDINATOR_PORT=\${HTTP_SERVER_PORT}`,
|
"COORDINATOR_PORT=${HTTP_SERVER_PORT}",
|
||||||
`# REGISTRY_HOST=\${DEPLOY_REGISTRY_HOST}`,
|
"# REGISTRY_HOST=${DEPLOY_REGISTRY_HOST}",
|
||||||
`# REGISTRY_NAMESPACE=\${DEPLOY_REGISTRY_NAMESPACE}`,
|
"# REGISTRY_NAMESPACE=${DEPLOY_REGISTRY_NAMESPACE}",
|
||||||
];
|
];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ export function getLocale(cookies: NextApiRequestCookies) {
|
|||||||
return locale;
|
return locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
import { serverSideTranslations as originalServerSideTranslations } from "next-i18next/serverSideTranslations";
|
|
||||||
import { Languages } from "@/lib/languages";
|
import { Languages } from "@/lib/languages";
|
||||||
|
import { serverSideTranslations as originalServerSideTranslations } from "next-i18next/serverSideTranslations";
|
||||||
|
|
||||||
export const serverSideTranslations = (
|
export const serverSideTranslations = (
|
||||||
locale: string,
|
locale: string,
|
||||||
|
|||||||
@@ -95,7 +95,9 @@ export const sendDatabaseBackupNotifications = async ({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "`❓`・Type",
|
name: "`❓`・Type",
|
||||||
value: type.replace("error", "Failed").replace("success", "Successful"),
|
value: type
|
||||||
|
.replace("error", "Failed")
|
||||||
|
.replace("success", "Successful"),
|
||||||
inline: true,
|
inline: true,
|
||||||
},
|
},
|
||||||
...(type === "error" && errorMessage
|
...(type === "error" && errorMessage
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ export const sendDockerCleanupNotifications = async (
|
|||||||
title: "> `✅` - Docker Cleanup",
|
title: "> `✅` - Docker Cleanup",
|
||||||
color: 0x57f287,
|
color: 0x57f287,
|
||||||
fields: [
|
fields: [
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "`📅`・Date",
|
name: "`📅`・Date",
|
||||||
value: date.toLocaleDateString(),
|
value: date.toLocaleDateString(),
|
||||||
|
|||||||
Reference in New Issue
Block a user