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