diff --git a/Dockerfile b/Dockerfile index 74b70db0e..bb5310f23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile # Deploy only the dokploy app ENV NODE_ENV=production +RUN pnpm --filter=@dokploy/server switch:prod RUN pnpm --filter=@dokploy/server build RUN pnpm --filter=./apps/dokploy run build diff --git a/Dockerfile.cloud b/Dockerfile.cloud index e8c420e10..255ac3ad7 100644 --- a/Dockerfile.cloud +++ b/Dockerfile.cloud @@ -15,6 +15,8 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server # Deploy only the dokploy app ENV NODE_ENV=production +RUN pnpm --filter=@dokploy/server switch:prod +RUN pnpm --filter=@dokploy/server build RUN pnpm --filter=./apps/dokploy run build RUN pnpm --filter=./apps/dokploy --prod deploy /prod/dokploy diff --git a/Dockerfile.schedule b/Dockerfile.schedule index 5eca3420e..36f06aef4 100644 --- a/Dockerfile.schedule +++ b/Dockerfile.schedule @@ -15,6 +15,7 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server # Deploy only the dokploy app ENV NODE_ENV=production +RUN pnpm --filter=@dokploy/server switch:prod RUN pnpm --filter=@dokploy/server build RUN pnpm --filter=./apps/schedules run build diff --git a/Dockerfile.server b/Dockerfile.server index a25b22e52..9cf04b212 100644 --- a/Dockerfile.server +++ b/Dockerfile.server @@ -15,6 +15,7 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server # Deploy only the dokploy app ENV NODE_ENV=production +RUN pnpm --filter=@dokploy/server switch:prod RUN pnpm --filter=@dokploy/server build RUN pnpm --filter=./apps/api run build diff --git a/packages/server/package.json b/packages/server/package.json index 75532859b..6772f035c 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -21,7 +21,6 @@ "import": "./dist/index.js", "require": "./dist/index.cjs.js" }, - "./dist/db": { "import": "./dist/db/index.js", "require": "./dist/db/*.cjs" diff --git a/packages/server/scripts/switchToSrc.js b/packages/server/scripts/switchToSrc.js index a3e2c3fd5..9387cd155 100644 --- a/packages/server/scripts/switchToSrc.js +++ b/packages/server/scripts/switchToSrc.js @@ -17,6 +17,27 @@ pkg.exports = { import: "./src/db/index.ts", require: "./dist/db/index.cjs.js", }, + "./setup/*": { + import: "./src/setup/*.ts", + require: "./dist/setup/index.cjs.js", + }, + "./constants": { + import: "./src/constants/index.ts", + require: "./dist/constants.cjs.js", + }, + "./dist": { + import: "./dist/index.js", + require: "./dist/index.cjs.js", + }, + + "./dist/db": { + import: "./dist/db/index.js", + require: "./dist/db/*.cjs", + }, + "./dist/db/schema": { + import: "./dist/db/schema/index.js", + require: "./dist/db/schema/*.cjs", + }, }; // Guardar los cambios en package.json