mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: add dynamic import queue
This commit is contained in:
@@ -15,7 +15,6 @@ import {
|
|||||||
} from "@dokploy/server";
|
} from "@dokploy/server";
|
||||||
import { config } from "dotenv";
|
import { config } from "dotenv";
|
||||||
import next from "next";
|
import next from "next";
|
||||||
import { deploymentWorker } from "./queues/deployments-queue";
|
|
||||||
import { setupDockerContainerLogsWebSocketServer } from "./wss/docker-container-logs";
|
import { setupDockerContainerLogsWebSocketServer } from "./wss/docker-container-logs";
|
||||||
import { setupDockerContainerTerminalWebSocketServer } from "./wss/docker-container-terminal";
|
import { setupDockerContainerTerminalWebSocketServer } from "./wss/docker-container-terminal";
|
||||||
import { setupDockerStatsMonitoringSocketServer } from "./wss/docker-stats";
|
import { setupDockerStatsMonitoringSocketServer } from "./wss/docker-stats";
|
||||||
@@ -62,17 +61,16 @@ void app.prepare().then(async () => {
|
|||||||
await sendDokployRestartNotifications();
|
await sendDokployRestartNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(process.env);
|
|
||||||
if (IS_CLOUD && process.env.NODE_ENV === "production") {
|
if (IS_CLOUD && process.env.NODE_ENV === "production") {
|
||||||
await migration();
|
await migration();
|
||||||
}
|
}
|
||||||
|
|
||||||
server.listen(PORT);
|
server.listen(PORT);
|
||||||
console.log("Server Started:", PORT);
|
console.log("Server Started:", PORT);
|
||||||
console.log(IS_CLOUD, process.env.IS_CLOUD);
|
|
||||||
if (!IS_CLOUD) {
|
if (!IS_CLOUD) {
|
||||||
console.log("Starting Deployment Worker");
|
console.log("Starting Deployment Worker");
|
||||||
deploymentWorker.run();
|
const { deploymentWorker } = await import("./queues/deployments-queue");
|
||||||
|
await deploymentWorker.run();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Main Server Error", e);
|
console.error("Main Server Error", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user