mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #1779 from Dokploy/feat/allow-to-pass-hostname-to-dokploy-server
Update server configuration to include HOST variable and enhance serv…
This commit is contained in:
@@ -21,6 +21,7 @@ import { setupTerminalWebSocketServer } from "./wss/terminal";
|
|||||||
|
|
||||||
config({ path: ".env" });
|
config({ path: ".env" });
|
||||||
const PORT = Number.parseInt(process.env.PORT || "3000", 10);
|
const PORT = Number.parseInt(process.env.PORT || "3000", 10);
|
||||||
|
const HOST = process.env.HOST || "0.0.0.0";
|
||||||
const dev = process.env.NODE_ENV !== "production";
|
const dev = process.env.NODE_ENV !== "production";
|
||||||
const app = next({ dev, turbopack: process.env.TURBOPACK === "1" });
|
const app = next({ dev, turbopack: process.env.TURBOPACK === "1" });
|
||||||
const handle = app.getRequestHandler();
|
const handle = app.getRequestHandler();
|
||||||
@@ -55,8 +56,8 @@ void app.prepare().then(async () => {
|
|||||||
await migration();
|
await migration();
|
||||||
}
|
}
|
||||||
|
|
||||||
server.listen(PORT);
|
server.listen(PORT, HOST);
|
||||||
console.log("Server Started:", PORT);
|
console.log(`Server Started on: http://${HOST}:${PORT}`);
|
||||||
if (!IS_CLOUD) {
|
if (!IS_CLOUD) {
|
||||||
console.log("Starting Deployment Worker");
|
console.log("Starting Deployment Worker");
|
||||||
const { deploymentWorker } = await import("./queues/deployments-queue");
|
const { deploymentWorker } = await import("./queues/deployments-queue");
|
||||||
|
|||||||
Reference in New Issue
Block a user