mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-19 10:25:20 +00:00
fix(wss): add cloud version restriction message in command execution
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { createWriteStream } from "node:fs";
|
import { createWriteStream } from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { paths } from "@dokploy/server/constants";
|
import { IS_CLOUD, paths } from "@dokploy/server/constants";
|
||||||
import type { Schedule } from "@dokploy/server/db/schema/schedule";
|
import type { Schedule } from "@dokploy/server/db/schema/schedule";
|
||||||
import {
|
import {
|
||||||
createDeploymentSchedule,
|
createDeploymentSchedule,
|
||||||
@@ -93,6 +93,13 @@ export const runCommand = async (scheduleId: string) => {
|
|||||||
const writeStream = createWriteStream(deployment.logPath, { flags: "a" });
|
const writeStream = createWriteStream(deployment.logPath, { flags: "a" });
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (IS_CLOUD) {
|
||||||
|
writeStream.write(
|
||||||
|
"This feature is not available in the cloud version.",
|
||||||
|
);
|
||||||
|
writeStream.end();
|
||||||
|
return;
|
||||||
|
}
|
||||||
writeStream.write(
|
writeStream.write(
|
||||||
`docker exec ${containerId} ${shellType} -c ${command}\n`,
|
`docker exec ${containerId} ${shellType} -c ${command}\n`,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user