mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-19 21:05:21 +02:00
Compare commits
21 Commits
v0.28.3
...
3905-isola
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38b20450dc | ||
|
|
49f43ab3fb | ||
|
|
2eae756cec | ||
|
|
70c261d021 | ||
|
|
9ae2ebff46 | ||
|
|
8ce880d108 | ||
|
|
34304526b1 | ||
|
|
a16c4c1294 | ||
|
|
d1c4ac20e3 | ||
|
|
0195119a86 | ||
|
|
48a577e792 | ||
|
|
bf7a75dd9f | ||
|
|
d316aa4401 | ||
|
|
f1b2cc35b3 | ||
|
|
d2fabc998d | ||
|
|
7185047eb7 | ||
|
|
7121fbe50a | ||
|
|
36cf3a69fc | ||
|
|
c34a01a173 | ||
|
|
9ac147a140 | ||
|
|
20f79ac655 |
@@ -1,4 +1,4 @@
|
|||||||
import { logger } from "./logger";
|
import { logger } from "./logger.js";
|
||||||
|
|
||||||
const baseUrl = process.env.INNGEST_BASE_URL ?? "";
|
const baseUrl = process.env.INNGEST_BASE_URL ?? "";
|
||||||
const signingKey = process.env.INNGEST_SIGNING_KEY ?? "";
|
const signingKey = process.env.INNGEST_SIGNING_KEY ?? "";
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
updateCompose,
|
updateCompose,
|
||||||
updatePreviewDeployment,
|
updatePreviewDeployment,
|
||||||
} from "@dokploy/server";
|
} from "@dokploy/server";
|
||||||
import type { DeployJob } from "./schema";
|
import type { DeployJob } from "./schema.js";
|
||||||
|
|
||||||
export const deploy = async (job: DeployJob) => {
|
export const deploy = async (job: DeployJob) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import {
|
|||||||
FormMessage,
|
FormMessage,
|
||||||
} from "@/components/ui/form";
|
} from "@/components/ui/form";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { authClient } from "@/lib/auth-client";
|
|
||||||
import { api } from "@/utils/api";
|
import { api } from "@/utils/api";
|
||||||
|
|
||||||
const organizationSchema = z.object({
|
const organizationSchema = z.object({
|
||||||
@@ -55,8 +54,6 @@ export function AddOrganization({ organizationId }: Props) {
|
|||||||
const { mutateAsync, isPending } = organizationId
|
const { mutateAsync, isPending } = organizationId
|
||||||
? api.organization.update.useMutation()
|
? api.organization.update.useMutation()
|
||||||
: api.organization.create.useMutation();
|
: api.organization.create.useMutation();
|
||||||
const { refetch: refetchActiveOrganization } =
|
|
||||||
authClient.useActiveOrganization();
|
|
||||||
|
|
||||||
const form = useForm<OrganizationFormValues>({
|
const form = useForm<OrganizationFormValues>({
|
||||||
resolver: zodResolver(organizationSchema),
|
resolver: zodResolver(organizationSchema),
|
||||||
@@ -89,7 +86,7 @@ export function AddOrganization({ organizationId }: Props) {
|
|||||||
utils.organization.all.invalidate();
|
utils.organization.all.invalidate();
|
||||||
if (organizationId) {
|
if (organizationId) {
|
||||||
utils.organization.one.invalidate({ organizationId });
|
utils.organization.one.invalidate({ organizationId });
|
||||||
refetchActiveOrganization();
|
utils.organization.active.invalidate();
|
||||||
}
|
}
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ import { api } from "@/utils/api";
|
|||||||
|
|
||||||
export const AddGithubProvider = () => {
|
export const AddGithubProvider = () => {
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
const { data: activeOrganization } = authClient.useActiveOrganization();
|
const { data: activeOrganization } = api.organization.active.useQuery();
|
||||||
|
|
||||||
const { data: session } = authClient.useSession();
|
const { data: session } = authClient.useSession();
|
||||||
const { data } = api.user.get.useQuery();
|
const { data } = api.user.get.useQuery();
|
||||||
const [manifest, setManifest] = useState("");
|
const [manifest, setManifest] = useState("");
|
||||||
@@ -52,7 +53,7 @@ export const AddGithubProvider = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
setManifest(manifest);
|
setManifest(manifest);
|
||||||
}, [data?.id, activeOrganization?.id, session?.user?.id]);
|
}, [activeOrganization?.id, session?.user?.id]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
<Dialog open={isOpen} onOpenChange={setIsOpen}>
|
||||||
@@ -131,11 +132,7 @@ export const AddGithubProvider = () => {
|
|||||||
Unsure if you already have an app?
|
Unsure if you already have an app?
|
||||||
</a>
|
</a>
|
||||||
<Button
|
<Button
|
||||||
disabled={
|
disabled={isOrganization && organizationName.length < 1}
|
||||||
(isOrganization && organizationName.length < 1) ||
|
|
||||||
!activeOrganization?.id ||
|
|
||||||
!session?.user?.id
|
|
||||||
}
|
|
||||||
type="submit"
|
type="submit"
|
||||||
className="self-end"
|
className="self-end"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const AddInvitation = () => {
|
|||||||
api.notification.getEmailProviders.useQuery();
|
api.notification.getEmailProviders.useQuery();
|
||||||
const { mutateAsync: sendInvitation } = api.user.sendInvitation.useMutation();
|
const { mutateAsync: sendInvitation } = api.user.sendInvitation.useMutation();
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
const { data: activeOrganization } = authClient.useActiveOrganization();
|
const { data: activeOrganization } = api.organization.active.useQuery();
|
||||||
|
|
||||||
const form = useForm<AddInvitation>({
|
const form = useForm<AddInvitation>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
|
|||||||
@@ -557,8 +557,7 @@ function SidebarLogo() {
|
|||||||
const { mutateAsync: setDefaultOrganization, isPending: isSettingDefault } =
|
const { mutateAsync: setDefaultOrganization, isPending: isSettingDefault } =
|
||||||
api.organization.setDefault.useMutation();
|
api.organization.setDefault.useMutation();
|
||||||
const { isMobile } = useSidebar();
|
const { isMobile } = useSidebar();
|
||||||
const { data: activeOrganization } = authClient.useActiveOrganization();
|
const { data: activeOrganization } = api.organization.active.useQuery();
|
||||||
const _utils = api.useUtils();
|
|
||||||
|
|
||||||
const { data: invitations, refetch: refetchInvitations } =
|
const { data: invitations, refetch: refetchInvitations } =
|
||||||
api.user.getInvitations.useQuery();
|
api.user.getInvitations.useQuery();
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ import { yaml } from "@codemirror/lang-yaml";
|
|||||||
import { StreamLanguage } from "@codemirror/language";
|
import { StreamLanguage } from "@codemirror/language";
|
||||||
import { properties } from "@codemirror/legacy-modes/mode/properties";
|
import { properties } from "@codemirror/legacy-modes/mode/properties";
|
||||||
import { shell } from "@codemirror/legacy-modes/mode/shell";
|
import { shell } from "@codemirror/legacy-modes/mode/shell";
|
||||||
import { EditorView } from "@codemirror/view";
|
import { search, searchKeymap } from "@codemirror/search";
|
||||||
|
import { EditorView, keymap } from "@codemirror/view";
|
||||||
import { githubDark, githubLight } from "@uiw/codemirror-theme-github";
|
import { githubDark, githubLight } from "@uiw/codemirror-theme-github";
|
||||||
import CodeMirror, { type ReactCodeMirrorProps } from "@uiw/react-codemirror";
|
import CodeMirror, { type ReactCodeMirrorProps } from "@uiw/react-codemirror";
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
@@ -155,6 +156,8 @@ export const CodeEditor = ({
|
|||||||
}}
|
}}
|
||||||
theme={resolvedTheme === "dark" ? githubDark : githubLight}
|
theme={resolvedTheme === "dark" ? githubDark : githubLight}
|
||||||
extensions={[
|
extensions={[
|
||||||
|
search(),
|
||||||
|
keymap.of(searchKeymap),
|
||||||
language === "yaml"
|
language === "yaml"
|
||||||
? yaml()
|
? yaml()
|
||||||
: language === "json"
|
: language === "json"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dokploy",
|
"name": "dokploy",
|
||||||
"version": "v0.28.3",
|
"version": "v0.28.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -53,7 +53,8 @@
|
|||||||
"@codemirror/lang-yaml": "^6.1.2",
|
"@codemirror/lang-yaml": "^6.1.2",
|
||||||
"@codemirror/language": "^6.11.0",
|
"@codemirror/language": "^6.11.0",
|
||||||
"@codemirror/legacy-modes": "6.4.0",
|
"@codemirror/legacy-modes": "6.4.0",
|
||||||
"@codemirror/view": "6.29.0",
|
"@codemirror/search": "^6.6.0",
|
||||||
|
"@codemirror/view": "^6.39.15",
|
||||||
"@dokploy/server": "workspace:*",
|
"@dokploy/server": "workspace:*",
|
||||||
"@dokploy/trpc-openapi": "0.0.17",
|
"@dokploy/trpc-openapi": "0.0.17",
|
||||||
"@faker-js/faker": "^8.4.1",
|
"@faker-js/faker": "^8.4.1",
|
||||||
|
|||||||
@@ -69,8 +69,7 @@ export const mountRouter = createTRPCRouter({
|
|||||||
create: protectedProcedure
|
create: protectedProcedure
|
||||||
.input(apiCreateMount)
|
.input(apiCreateMount)
|
||||||
.mutation(async ({ input }) => {
|
.mutation(async ({ input }) => {
|
||||||
await createMount(input);
|
return await createMount(input);
|
||||||
return true;
|
|
||||||
}),
|
}),
|
||||||
remove: protectedProcedure
|
remove: protectedProcedure
|
||||||
.input(apiRemoveMount)
|
.input(apiRemoveMount)
|
||||||
|
|||||||
@@ -355,4 +355,13 @@ export const organizationRouter = createTRPCRouter({
|
|||||||
|
|
||||||
return { success: true };
|
return { success: true };
|
||||||
}),
|
}),
|
||||||
|
active: protectedProcedure.query(async ({ ctx }) => {
|
||||||
|
if (!ctx.session.activeOrganizationId) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return await db.query.organization.findFirst({
|
||||||
|
where: eq(organization.id, ctx.session.activeOrganizationId),
|
||||||
|
});
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,8 +2,24 @@ import path from "node:path";
|
|||||||
import Docker from "dockerode";
|
import Docker from "dockerode";
|
||||||
|
|
||||||
export const IS_CLOUD = process.env.IS_CLOUD === "true";
|
export const IS_CLOUD = process.env.IS_CLOUD === "true";
|
||||||
|
export const DOCKER_API_VERSION = process.env.DOCKER_API_VERSION;
|
||||||
|
export const DOCKER_HOST = process.env.DOCKER_HOST;
|
||||||
|
export const DOCKER_PORT = process.env.DOCKER_PORT
|
||||||
|
? Number(process.env.DOCKER_PORT)
|
||||||
|
: undefined;
|
||||||
|
|
||||||
export const CLEANUP_CRON_JOB = "50 23 * * *";
|
export const CLEANUP_CRON_JOB = "50 23 * * *";
|
||||||
export const docker = new Docker();
|
export const docker = new Docker({
|
||||||
|
...(DOCKER_API_VERSION && {
|
||||||
|
version: DOCKER_API_VERSION,
|
||||||
|
}),
|
||||||
|
...(DOCKER_HOST && {
|
||||||
|
host: DOCKER_HOST,
|
||||||
|
}),
|
||||||
|
...(DOCKER_PORT && {
|
||||||
|
port: DOCKER_PORT,
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
// When not set, use the legacy default so 2FA remains working for users who
|
// When not set, use the legacy default so 2FA remains working for users who
|
||||||
// enabled it before BETTER_AUTH_SECRET was introduced .
|
// enabled it before BETTER_AUTH_SECRET was introduced .
|
||||||
|
|||||||
@@ -365,12 +365,13 @@ const createSchema = createInsertSchema(applications, {
|
|||||||
previewPath: z.string().optional(),
|
previewPath: z.string().optional(),
|
||||||
previewCertificateType: z.enum(["letsencrypt", "none", "custom"]).optional(),
|
previewCertificateType: z.enum(["letsencrypt", "none", "custom"]).optional(),
|
||||||
previewRequireCollaboratorPermissions: z.boolean().optional(),
|
previewRequireCollaboratorPermissions: z.boolean().optional(),
|
||||||
watchPaths: z.array(z.string()).optional(),
|
watchPaths: z.array(z.string()).optional().optional(),
|
||||||
previewLabels: z.array(z.string()).optional(),
|
previewLabels: z.array(z.string()).optional(),
|
||||||
cleanCache: z.boolean().optional(),
|
cleanCache: z.boolean().optional(),
|
||||||
stopGracePeriodSwarm: z.bigint().nullable(),
|
stopGracePeriodSwarm: z.bigint().nullable(),
|
||||||
endpointSpecSwarm: EndpointSpecSwarmSchema.nullable(),
|
endpointSpecSwarm: EndpointSpecSwarmSchema.nullable(),
|
||||||
ulimitsSwarm: UlimitsSwarmSchema.nullable(),
|
ulimitsSwarm: UlimitsSwarmSchema.nullable(),
|
||||||
|
enableSubmodules: z.boolean().optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const apiCreateApplication = createSchema.pick({
|
export const apiCreateApplication = createSchema.pick({
|
||||||
@@ -433,13 +434,13 @@ export const apiSaveGithubProvider = createSchema
|
|||||||
owner: true,
|
owner: true,
|
||||||
buildPath: true,
|
buildPath: true,
|
||||||
githubId: true,
|
githubId: true,
|
||||||
watchPaths: true,
|
|
||||||
enableSubmodules: true,
|
|
||||||
})
|
})
|
||||||
.required()
|
.required()
|
||||||
.extend({
|
.extend({
|
||||||
triggerType: z.enum(["push", "tag"]).default("push"),
|
triggerType: z.enum(["push", "tag"]).default("push"),
|
||||||
});
|
})
|
||||||
|
.required()
|
||||||
|
.merge(createSchema.pick({ enableSubmodules: true, watchPaths: true }));
|
||||||
|
|
||||||
export const apiSaveGitlabProvider = createSchema
|
export const apiSaveGitlabProvider = createSchema
|
||||||
.pick({
|
.pick({
|
||||||
@@ -451,10 +452,9 @@ export const apiSaveGitlabProvider = createSchema
|
|||||||
gitlabId: true,
|
gitlabId: true,
|
||||||
gitlabProjectId: true,
|
gitlabProjectId: true,
|
||||||
gitlabPathNamespace: true,
|
gitlabPathNamespace: true,
|
||||||
watchPaths: true,
|
|
||||||
enableSubmodules: true,
|
|
||||||
})
|
})
|
||||||
.required();
|
.required()
|
||||||
|
.merge(createSchema.pick({ enableSubmodules: true, watchPaths: true }));
|
||||||
|
|
||||||
export const apiSaveBitbucketProvider = createSchema
|
export const apiSaveBitbucketProvider = createSchema
|
||||||
.pick({
|
.pick({
|
||||||
@@ -465,10 +465,9 @@ export const apiSaveBitbucketProvider = createSchema
|
|||||||
bitbucketRepositorySlug: true,
|
bitbucketRepositorySlug: true,
|
||||||
bitbucketId: true,
|
bitbucketId: true,
|
||||||
applicationId: true,
|
applicationId: true,
|
||||||
watchPaths: true,
|
|
||||||
enableSubmodules: true,
|
|
||||||
})
|
})
|
||||||
.required();
|
.required()
|
||||||
|
.merge(createSchema.pick({ enableSubmodules: true, watchPaths: true }));
|
||||||
|
|
||||||
export const apiSaveGiteaProvider = createSchema
|
export const apiSaveGiteaProvider = createSchema
|
||||||
.pick({
|
.pick({
|
||||||
@@ -478,10 +477,9 @@ export const apiSaveGiteaProvider = createSchema
|
|||||||
giteaOwner: true,
|
giteaOwner: true,
|
||||||
giteaRepository: true,
|
giteaRepository: true,
|
||||||
giteaId: true,
|
giteaId: true,
|
||||||
watchPaths: true,
|
|
||||||
enableSubmodules: true,
|
|
||||||
})
|
})
|
||||||
.required();
|
.required()
|
||||||
|
.merge(createSchema.pick({ enableSubmodules: true, watchPaths: true }));
|
||||||
|
|
||||||
export const apiSaveDockerProvider = createSchema
|
export const apiSaveDockerProvider = createSchema
|
||||||
.pick({
|
.pick({
|
||||||
@@ -506,6 +504,7 @@ export const apiSaveGitProvider = createSchema
|
|||||||
.merge(
|
.merge(
|
||||||
createSchema.pick({
|
createSchema.pick({
|
||||||
customGitSSHKeyId: true,
|
customGitSSHKeyId: true,
|
||||||
|
enableSubmodules: true,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -99,17 +99,15 @@ const createSchema = createInsertSchema(mounts, {
|
|||||||
mountPath: z.string().min(1),
|
mountPath: z.string().min(1),
|
||||||
mountId: z.string().optional(),
|
mountId: z.string().optional(),
|
||||||
filePath: z.string().optional(),
|
filePath: z.string().optional(),
|
||||||
serviceType: z
|
serviceType: z.enum([
|
||||||
.enum([
|
"application",
|
||||||
"application",
|
"postgres",
|
||||||
"postgres",
|
"mysql",
|
||||||
"mysql",
|
"mariadb",
|
||||||
"mariadb",
|
"mongo",
|
||||||
"mongo",
|
"redis",
|
||||||
"redis",
|
"compose",
|
||||||
"compose",
|
]),
|
||||||
])
|
|
||||||
.default("application"),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export type ServiceType = NonNullable<
|
export type ServiceType = NonNullable<
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function shEscape(s: string | undefined): string {
|
|||||||
return `'${s.replace(/'/g, `'\\''`)}'`;
|
return `'${s.replace(/'/g, `'\\''`)}'`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function safeDockerLoginCommand(
|
export function safeDockerLoginCommand(
|
||||||
registry: string | undefined,
|
registry: string | undefined,
|
||||||
user: string | undefined,
|
user: string | undefined,
|
||||||
pass: string | undefined,
|
pass: string | undefined,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import { findDeploymentById } from "./deployment";
|
|||||||
import type { Mount } from "./mount";
|
import type { Mount } from "./mount";
|
||||||
import type { Port } from "./port";
|
import type { Port } from "./port";
|
||||||
import type { Project } from "./project";
|
import type { Project } from "./project";
|
||||||
import type { Registry } from "./registry";
|
import { type Registry, safeDockerLoginCommand } from "./registry";
|
||||||
|
|
||||||
export const createRollback = async (
|
export const createRollback = async (
|
||||||
input: z.infer<typeof createRollbackSchema>,
|
input: z.infer<typeof createRollbackSchema>,
|
||||||
@@ -111,7 +111,7 @@ const deleteRollbackImage = async (image: string, serverId?: string | null) => {
|
|||||||
const command = `docker image rm ${image} --force`;
|
const command = `docker image rm ${image} --force`;
|
||||||
|
|
||||||
if (serverId) {
|
if (serverId) {
|
||||||
await execAsyncRemote(command, serverId);
|
await execAsyncRemote(serverId, command);
|
||||||
} else {
|
} else {
|
||||||
await execAsync(command);
|
await execAsync(command);
|
||||||
}
|
}
|
||||||
@@ -171,6 +171,23 @@ export const rollback = async (rollbackId: string) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const dockerLoginForRegistry = async (
|
||||||
|
registry: Registry,
|
||||||
|
serverId?: string | null,
|
||||||
|
) => {
|
||||||
|
const loginCommand = safeDockerLoginCommand(
|
||||||
|
registry.registryUrl,
|
||||||
|
registry.username,
|
||||||
|
registry.password,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (serverId) {
|
||||||
|
await execAsyncRemote(serverId, loginCommand);
|
||||||
|
} else {
|
||||||
|
await execAsync(loginCommand);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const rollbackApplication = async (
|
const rollbackApplication = async (
|
||||||
appName: string,
|
appName: string,
|
||||||
image: string,
|
image: string,
|
||||||
@@ -188,6 +205,14 @@ const rollbackApplication = async (
|
|||||||
throw new Error("Full context is required for rollback");
|
throw new Error("Full context is required for rollback");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure Docker daemon is authenticated with the rollback registry
|
||||||
|
// before updating the swarm service. The authconfig in CreateServiceOptions
|
||||||
|
// alone is not sufficient — Docker Swarm also relies on the daemon's
|
||||||
|
// cached credentials (~/.docker/config.json) to distribute auth to nodes.
|
||||||
|
if (fullContext.rollbackRegistry) {
|
||||||
|
await dockerLoginForRegistry(fullContext.rollbackRegistry, serverId);
|
||||||
|
}
|
||||||
|
|
||||||
const docker = await getRemoteDocker(serverId);
|
const docker = await getRemoteDocker(serverId);
|
||||||
|
|
||||||
// Use the same configuration as mechanizeDockerContainer
|
// Use the same configuration as mechanizeDockerContainer
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export const runWebServerBackup = async (backup: BackupSchedule) => {
|
|||||||
await execAsync(cleanupCommand);
|
await execAsync(cleanupCommand);
|
||||||
|
|
||||||
await execAsync(
|
await execAsync(
|
||||||
`rsync -a --ignore-errors ${BASE_PATH}/ ${tempDir}/filesystem/`,
|
`rsync -a --ignore-errors --no-specials --no-devices ${BASE_PATH}/ ${tempDir}/filesystem/`,
|
||||||
);
|
);
|
||||||
|
|
||||||
writeStream.write("Copied filesystem to temp directory\n");
|
writeStream.write("Copied filesystem to temp directory\n");
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ Compose Type: ${composeType} ✅`;
|
|||||||
|
|
||||||
cd "${projectPath}";
|
cd "${projectPath}";
|
||||||
|
|
||||||
${compose.isolatedDeployment ? `docker network inspect ${compose.appName} >/dev/null 2>&1 || docker network create --attachable ${compose.appName}` : ""}
|
${compose.isolatedDeployment ? `docker network inspect ${compose.appName} >/dev/null 2>&1 || docker network create ${compose.composeType === "stack" ? "--driver overlay" : ""} --attachable ${compose.appName}` : ""}
|
||||||
env -i PATH="$PATH" ${exportEnvCommand} docker ${command.split(" ").join(" ")} 2>&1 || { echo "Error: ❌ Docker command failed"; exit 1; }
|
env -i PATH="$PATH" ${exportEnvCommand} docker ${command.split(" ").join(" ")} 2>&1 || { echo "Error: ❌ Docker command failed"; exit 1; }
|
||||||
${compose.isolatedDeployment ? `docker network connect ${compose.appName} $(docker ps --filter "name=dokploy-traefik" -q) >/dev/null 2>&1` : ""}
|
${compose.isolatedDeployment ? `docker network connect ${compose.appName} $(docker ps --filter "name=dokploy-traefik" -q) >/dev/null 2>&1` : ""}
|
||||||
|
|
||||||
|
|||||||
@@ -152,16 +152,13 @@ export const createRouterConfig = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((entryPoint === "websecure" && https) || !https) {
|
if ((entryPoint === "websecure" && https) || !https) {
|
||||||
// redirects
|
// redirects - skip for preview deployments as wildcard subdomains
|
||||||
for (const redirect of redirects) {
|
// should not inherit parent redirect rules (e.g., www-redirect)
|
||||||
let middlewareName = `redirect-${appName}-${redirect.uniqueConfigKey}`;
|
if (domain.domainType !== "preview") {
|
||||||
if (domain.domainType === "preview") {
|
for (const redirect of redirects) {
|
||||||
middlewareName = `redirect-${appName.replace(
|
const middlewareName = `redirect-${appName}-${redirect.uniqueConfigKey}`;
|
||||||
/^preview-(.+)-[^-]+$/,
|
routerConfig.middlewares?.push(middlewareName);
|
||||||
"$1",
|
|
||||||
)}-${redirect.uniqueConfigKey}`;
|
|
||||||
}
|
}
|
||||||
routerConfig.middlewares?.push(middlewareName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// security
|
// security
|
||||||
|
|||||||
48
pnpm-lock.yaml
generated
48
pnpm-lock.yaml
generated
@@ -131,9 +131,12 @@ importers:
|
|||||||
'@codemirror/legacy-modes':
|
'@codemirror/legacy-modes':
|
||||||
specifier: 6.4.0
|
specifier: 6.4.0
|
||||||
version: 6.4.0
|
version: 6.4.0
|
||||||
|
'@codemirror/search':
|
||||||
|
specifier: ^6.6.0
|
||||||
|
version: 6.6.0
|
||||||
'@codemirror/view':
|
'@codemirror/view':
|
||||||
specifier: 6.29.0
|
specifier: ^6.39.15
|
||||||
version: 6.29.0
|
version: 6.39.15
|
||||||
'@dokploy/server':
|
'@dokploy/server':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../packages/server
|
version: link:../../packages/server
|
||||||
@@ -241,10 +244,10 @@ importers:
|
|||||||
version: 11.10.0(typescript@5.9.3)
|
version: 11.10.0(typescript@5.9.3)
|
||||||
'@uiw/codemirror-theme-github':
|
'@uiw/codemirror-theme-github':
|
||||||
specifier: ^4.23.12
|
specifier: ^4.23.12
|
||||||
version: 4.25.4(@codemirror/language@6.12.1)(@codemirror/state@6.5.4)(@codemirror/view@6.29.0)
|
version: 4.25.4(@codemirror/language@6.12.1)(@codemirror/state@6.5.4)(@codemirror/view@6.39.15)
|
||||||
'@uiw/react-codemirror':
|
'@uiw/react-codemirror':
|
||||||
specifier: ^4.23.12
|
specifier: ^4.23.12
|
||||||
version: 4.25.4(@babel/runtime@7.28.6)(@codemirror/autocomplete@6.20.0)(@codemirror/language@6.12.1)(@codemirror/lint@6.9.4)(@codemirror/search@6.6.0)(@codemirror/state@6.5.4)(@codemirror/theme-one-dark@6.1.3)(@codemirror/view@6.29.0)(codemirror@6.0.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
|
version: 4.25.4(@babel/runtime@7.28.6)(@codemirror/autocomplete@6.20.0)(@codemirror/language@6.12.1)(@codemirror/lint@6.9.4)(@codemirror/search@6.6.0)(@codemirror/state@6.5.4)(@codemirror/theme-one-dark@6.1.3)(@codemirror/view@6.39.15)(codemirror@6.0.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)
|
||||||
'@xterm/addon-attach':
|
'@xterm/addon-attach':
|
||||||
specifier: 0.10.0
|
specifier: 0.10.0
|
||||||
version: 0.10.0(@xterm/xterm@5.5.0)
|
version: 0.10.0(@xterm/xterm@5.5.0)
|
||||||
@@ -1285,9 +1288,6 @@ packages:
|
|||||||
'@codemirror/theme-one-dark@6.1.3':
|
'@codemirror/theme-one-dark@6.1.3':
|
||||||
resolution: {integrity: sha512-NzBdIvEJmx6fjeremiGp3t/okrLPYT0d9orIc7AFun8oZcRk58aejkqhv6spnz4MLAevrKNPMQYXEWMg4s+sKA==}
|
resolution: {integrity: sha512-NzBdIvEJmx6fjeremiGp3t/okrLPYT0d9orIc7AFun8oZcRk58aejkqhv6spnz4MLAevrKNPMQYXEWMg4s+sKA==}
|
||||||
|
|
||||||
'@codemirror/view@6.29.0':
|
|
||||||
resolution: {integrity: sha512-ED4ims4fkf7eOA+HYLVP8VVg3NMllt1FPm9PEJBfYFnidKlRITBaua38u68L1F60eNtw2YNcDN5jsIzhKZwWQA==}
|
|
||||||
|
|
||||||
'@codemirror/view@6.39.15':
|
'@codemirror/view@6.39.15':
|
||||||
resolution: {integrity: sha512-aCWjgweIIXLBHh7bY6cACvXuyrZ0xGafjQ2VInjp4RM4gMfscK5uESiNdrH0pE+e1lZr2B4ONGsjchl2KsKZzg==}
|
resolution: {integrity: sha512-aCWjgweIIXLBHh7bY6cACvXuyrZ0xGafjQ2VInjp4RM4gMfscK5uESiNdrH0pE+e1lZr2B4ONGsjchl2KsKZzg==}
|
||||||
|
|
||||||
@@ -8793,14 +8793,14 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@codemirror/language': 6.12.1
|
'@codemirror/language': 6.12.1
|
||||||
'@codemirror/state': 6.5.4
|
'@codemirror/state': 6.5.4
|
||||||
'@codemirror/view': 6.29.0
|
'@codemirror/view': 6.39.15
|
||||||
'@lezer/common': 1.5.1
|
'@lezer/common': 1.5.1
|
||||||
|
|
||||||
'@codemirror/commands@6.10.2':
|
'@codemirror/commands@6.10.2':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@codemirror/language': 6.12.1
|
'@codemirror/language': 6.12.1
|
||||||
'@codemirror/state': 6.5.4
|
'@codemirror/state': 6.5.4
|
||||||
'@codemirror/view': 6.29.0
|
'@codemirror/view': 6.39.15
|
||||||
'@lezer/common': 1.5.1
|
'@lezer/common': 1.5.1
|
||||||
|
|
||||||
'@codemirror/lang-json@6.0.2':
|
'@codemirror/lang-json@6.0.2':
|
||||||
@@ -8821,7 +8821,7 @@ snapshots:
|
|||||||
'@codemirror/language@6.12.1':
|
'@codemirror/language@6.12.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@codemirror/state': 6.5.4
|
'@codemirror/state': 6.5.4
|
||||||
'@codemirror/view': 6.29.0
|
'@codemirror/view': 6.39.15
|
||||||
'@lezer/common': 1.5.1
|
'@lezer/common': 1.5.1
|
||||||
'@lezer/highlight': 1.2.3
|
'@lezer/highlight': 1.2.3
|
||||||
'@lezer/lr': 1.4.8
|
'@lezer/lr': 1.4.8
|
||||||
@@ -8851,15 +8851,9 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@codemirror/language': 6.12.1
|
'@codemirror/language': 6.12.1
|
||||||
'@codemirror/state': 6.5.4
|
'@codemirror/state': 6.5.4
|
||||||
'@codemirror/view': 6.29.0
|
'@codemirror/view': 6.39.15
|
||||||
'@lezer/highlight': 1.2.3
|
'@lezer/highlight': 1.2.3
|
||||||
|
|
||||||
'@codemirror/view@6.29.0':
|
|
||||||
dependencies:
|
|
||||||
'@codemirror/state': 6.5.4
|
|
||||||
style-mod: 4.1.3
|
|
||||||
w3c-keyname: 2.2.8
|
|
||||||
|
|
||||||
'@codemirror/view@6.39.15':
|
'@codemirror/view@6.39.15':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@codemirror/state': 6.5.4
|
'@codemirror/state': 6.5.4
|
||||||
@@ -12094,7 +12088,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 24.10.13
|
'@types/node': 24.10.13
|
||||||
|
|
||||||
'@uiw/codemirror-extensions-basic-setup@4.25.4(@codemirror/autocomplete@6.20.0)(@codemirror/commands@6.10.2)(@codemirror/language@6.12.1)(@codemirror/lint@6.9.4)(@codemirror/search@6.6.0)(@codemirror/state@6.5.4)(@codemirror/view@6.29.0)':
|
'@uiw/codemirror-extensions-basic-setup@4.25.4(@codemirror/autocomplete@6.20.0)(@codemirror/commands@6.10.2)(@codemirror/language@6.12.1)(@codemirror/lint@6.9.4)(@codemirror/search@6.6.0)(@codemirror/state@6.5.4)(@codemirror/view@6.39.15)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@codemirror/autocomplete': 6.20.0
|
'@codemirror/autocomplete': 6.20.0
|
||||||
'@codemirror/commands': 6.10.2
|
'@codemirror/commands': 6.10.2
|
||||||
@@ -12102,30 +12096,30 @@ snapshots:
|
|||||||
'@codemirror/lint': 6.9.4
|
'@codemirror/lint': 6.9.4
|
||||||
'@codemirror/search': 6.6.0
|
'@codemirror/search': 6.6.0
|
||||||
'@codemirror/state': 6.5.4
|
'@codemirror/state': 6.5.4
|
||||||
'@codemirror/view': 6.29.0
|
'@codemirror/view': 6.39.15
|
||||||
|
|
||||||
'@uiw/codemirror-theme-github@4.25.4(@codemirror/language@6.12.1)(@codemirror/state@6.5.4)(@codemirror/view@6.29.0)':
|
'@uiw/codemirror-theme-github@4.25.4(@codemirror/language@6.12.1)(@codemirror/state@6.5.4)(@codemirror/view@6.39.15)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@uiw/codemirror-themes': 4.25.4(@codemirror/language@6.12.1)(@codemirror/state@6.5.4)(@codemirror/view@6.29.0)
|
'@uiw/codemirror-themes': 4.25.4(@codemirror/language@6.12.1)(@codemirror/state@6.5.4)(@codemirror/view@6.39.15)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@codemirror/language'
|
- '@codemirror/language'
|
||||||
- '@codemirror/state'
|
- '@codemirror/state'
|
||||||
- '@codemirror/view'
|
- '@codemirror/view'
|
||||||
|
|
||||||
'@uiw/codemirror-themes@4.25.4(@codemirror/language@6.12.1)(@codemirror/state@6.5.4)(@codemirror/view@6.29.0)':
|
'@uiw/codemirror-themes@4.25.4(@codemirror/language@6.12.1)(@codemirror/state@6.5.4)(@codemirror/view@6.39.15)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@codemirror/language': 6.12.1
|
'@codemirror/language': 6.12.1
|
||||||
'@codemirror/state': 6.5.4
|
'@codemirror/state': 6.5.4
|
||||||
'@codemirror/view': 6.29.0
|
'@codemirror/view': 6.39.15
|
||||||
|
|
||||||
'@uiw/react-codemirror@4.25.4(@babel/runtime@7.28.6)(@codemirror/autocomplete@6.20.0)(@codemirror/language@6.12.1)(@codemirror/lint@6.9.4)(@codemirror/search@6.6.0)(@codemirror/state@6.5.4)(@codemirror/theme-one-dark@6.1.3)(@codemirror/view@6.29.0)(codemirror@6.0.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)':
|
'@uiw/react-codemirror@4.25.4(@babel/runtime@7.28.6)(@codemirror/autocomplete@6.20.0)(@codemirror/language@6.12.1)(@codemirror/lint@6.9.4)(@codemirror/search@6.6.0)(@codemirror/state@6.5.4)(@codemirror/theme-one-dark@6.1.3)(@codemirror/view@6.39.15)(codemirror@6.0.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime': 7.28.6
|
'@babel/runtime': 7.28.6
|
||||||
'@codemirror/commands': 6.10.2
|
'@codemirror/commands': 6.10.2
|
||||||
'@codemirror/state': 6.5.4
|
'@codemirror/state': 6.5.4
|
||||||
'@codemirror/theme-one-dark': 6.1.3
|
'@codemirror/theme-one-dark': 6.1.3
|
||||||
'@codemirror/view': 6.29.0
|
'@codemirror/view': 6.39.15
|
||||||
'@uiw/codemirror-extensions-basic-setup': 4.25.4(@codemirror/autocomplete@6.20.0)(@codemirror/commands@6.10.2)(@codemirror/language@6.12.1)(@codemirror/lint@6.9.4)(@codemirror/search@6.6.0)(@codemirror/state@6.5.4)(@codemirror/view@6.29.0)
|
'@uiw/codemirror-extensions-basic-setup': 4.25.4(@codemirror/autocomplete@6.20.0)(@codemirror/commands@6.10.2)(@codemirror/language@6.12.1)(@codemirror/lint@6.9.4)(@codemirror/search@6.6.0)(@codemirror/state@6.5.4)(@codemirror/view@6.39.15)
|
||||||
codemirror: 6.0.2
|
codemirror: 6.0.2
|
||||||
react: 18.2.0
|
react: 18.2.0
|
||||||
react-dom: 18.2.0(react@18.2.0)
|
react-dom: 18.2.0(react@18.2.0)
|
||||||
@@ -12772,7 +12766,7 @@ snapshots:
|
|||||||
'@codemirror/lint': 6.9.4
|
'@codemirror/lint': 6.9.4
|
||||||
'@codemirror/search': 6.6.0
|
'@codemirror/search': 6.6.0
|
||||||
'@codemirror/state': 6.5.4
|
'@codemirror/state': 6.5.4
|
||||||
'@codemirror/view': 6.29.0
|
'@codemirror/view': 6.39.15
|
||||||
|
|
||||||
color-convert@2.0.1:
|
color-convert@2.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
Reference in New Issue
Block a user