From 944d89f6d2aa9e8e900b8b2dfa7d21367d8af1ae Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Wed, 1 May 2024 01:11:36 -0600 Subject: [PATCH] refactor: add current directory + .docker dir in dev --- server/constants/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/constants/index.ts b/server/constants/index.ts index fe3f9fa6..4c7cd5a5 100644 --- a/server/constants/index.ts +++ b/server/constants/index.ts @@ -1,6 +1,10 @@ import Docker from "dockerode"; +import path from "node:path"; -export const BASE_PATH = "/etc/dokploy"; +export const BASE_PATH = + process.env.NODE_ENV === "production" + ? "/etc/dokploy" + : path.join(process.cwd(), ".docker"); export const MAIN_TRAEFIK_PATH = `${BASE_PATH}/traefik`; export const DYNAMIC_TRAEFIK_PATH = `${BASE_PATH}/traefik/dynamic`; export const LOGS_PATH = `${BASE_PATH}/logs`;