From 89f3078ce5a5415a791beec627e10f6f3ad199af Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 5 Oct 2024 22:15:57 -0600 Subject: [PATCH] refactor: update package name --- Dockerfile | 2 +- Dockerfile.api | 4 ++-- Dockerfile.cloud | 4 ++-- apps/api/src/index.ts | 6 +++--- apps/api/tsconfig.json | 22 ++++++++++---------- apps/dokploy/server/db/schema/index.ts | 2 +- apps/dokploy/tsconfig.server.json | 28 +++++++++++++------------- apps/schedules/src/index.ts | 4 ++-- apps/schedules/src/queue.ts | 2 +- apps/schedules/src/workers.ts | 2 +- apps/schedules/tsconfig.json | 22 ++++++++++---------- package.json | 2 +- 12 files changed, 50 insertions(+), 50 deletions(-) diff --git a/Dockerfile b/Dockerfile index 739c9ef99..74b70db0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +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/builders build +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.api b/Dockerfile.api index 17e5b7596..a25b22e52 100644 --- a/Dockerfile.api +++ b/Dockerfile.api @@ -10,12 +10,12 @@ WORKDIR /usr/src/app RUN apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib/apt/lists/* # Install dependencies -RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/builders --filter=./apps/api install --frozen-lockfile +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server --filter=./apps/api install --frozen-lockfile # Deploy only the dokploy app ENV NODE_ENV=production -RUN pnpm --filter=@dokploy/builders build +RUN pnpm --filter=@dokploy/server build RUN pnpm --filter=./apps/api run build RUN pnpm --filter=./apps/api --prod deploy /prod/api diff --git a/Dockerfile.cloud b/Dockerfile.cloud index 60ea93b57..5694b7d63 100644 --- a/Dockerfile.cloud +++ b/Dockerfile.cloud @@ -10,12 +10,12 @@ WORKDIR /usr/src/app RUN apt-get update && apt-get install -y python3 make g++ git && rm -rf /var/lib/apt/lists/* # Install dependencies -RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/builders --filter=./apps/dokploy install --frozen-lockfile +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server --filter=./apps/dokploy install --frozen-lockfile # Deploy only the dokploy app ENV NODE_ENV=production -RUN pnpm --filter=@dokploy/builders build +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/apps/api/src/index.ts b/apps/api/src/index.ts index 283de9f50..82f8f0c75 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -1,12 +1,12 @@ import { serve } from "@hono/node-server"; import { Hono } from "hono"; import "dotenv/config"; -import { createClient } from "redis"; -import { Queue } from "@nerimity/mimiqueue"; import { zValidator } from "@hono/zod-validator"; +import { Queue } from "@nerimity/mimiqueue"; +import { createClient } from "redis"; +import { logger } from "./logger"; import { type DeployJob, deployJobSchema } from "./schema"; import { deploy } from "./utils"; -import { logger } from "./logger"; const app = new Hono(); const redisClient = createClient({ diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json index 8d3088b4c..3c0b02bc0 100644 --- a/apps/api/tsconfig.json +++ b/apps/api/tsconfig.json @@ -1,13 +1,13 @@ { - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "Node", - "strict": true, - "skipLibCheck": true, - "outDir": "dist", - "jsx": "react-jsx", - "jsxImportSource": "hono/jsx" - }, - "exclude": ["node_modules", "dist"] + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "Node", + "strict": true, + "skipLibCheck": true, + "outDir": "dist", + "jsx": "react-jsx", + "jsxImportSource": "hono/jsx" + }, + "exclude": ["node_modules", "dist"] } diff --git a/apps/dokploy/server/db/schema/index.ts b/apps/dokploy/server/db/schema/index.ts index 77b2e0022..c501bf93b 100644 --- a/apps/dokploy/server/db/schema/index.ts +++ b/apps/dokploy/server/db/schema/index.ts @@ -1 +1 @@ -export * from "@dokploy/builders/dist/db/schema"; +export * from "@dokploy/server/dist/db/schema"; diff --git a/apps/dokploy/tsconfig.server.json b/apps/dokploy/tsconfig.server.json index dc4d6a541..a5cc7a30b 100644 --- a/apps/dokploy/tsconfig.server.json +++ b/apps/dokploy/tsconfig.server.json @@ -1,16 +1,16 @@ { - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "ESNext", - "outDir": "dist/", - "target": "ESNext", - "isolatedModules": false, - "noEmit": false, - "moduleResolution": "Node", - "baseUrl": ".", - "paths": { - "@/*": ["./*"] - } - }, - "include": ["next-env.d.ts", "./server/**/*"] + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "ESNext", + "outDir": "dist/", + "target": "ESNext", + "isolatedModules": false, + "noEmit": false, + "moduleResolution": "Node", + "baseUrl": ".", + "paths": { + "@/*": ["./*"] + } + }, + "include": ["next-env.d.ts", "./server/**/*"] } diff --git a/apps/schedules/src/index.ts b/apps/schedules/src/index.ts index f83bde24a..351775b7d 100644 --- a/apps/schedules/src/index.ts +++ b/apps/schedules/src/index.ts @@ -2,10 +2,10 @@ import { serve } from "@hono/node-server"; import { Hono } from "hono"; import "dotenv/config"; import { zValidator } from "@hono/zod-validator"; -import { jobQueueSchema } from "./schema"; -import { firstWorker, secondWorker } from "./workers"; import { logger } from "./logger"; import { cleanQueue, removeJob, scheduleJob } from "./queue"; +import { jobQueueSchema } from "./schema"; +import { firstWorker, secondWorker } from "./workers"; const app = new Hono(); diff --git a/apps/schedules/src/queue.ts b/apps/schedules/src/queue.ts index 40baba615..aec548e69 100644 --- a/apps/schedules/src/queue.ts +++ b/apps/schedules/src/queue.ts @@ -1,6 +1,6 @@ import { Queue } from "bullmq"; -import type { QueueJob } from "./schema"; import { logger } from "./logger"; +import type { QueueJob } from "./schema"; export const jobQueue = new Queue("backupQueue", { connection: { diff --git a/apps/schedules/src/workers.ts b/apps/schedules/src/workers.ts index cd5b0eb93..a2583e4d9 100644 --- a/apps/schedules/src/workers.ts +++ b/apps/schedules/src/workers.ts @@ -1,5 +1,5 @@ -import type { QueueJob } from "./schema"; import { type Job, Worker } from "bullmq"; +import type { QueueJob } from "./schema"; import { runJobs } from "./utils"; export const firstWorker = new Worker( diff --git a/apps/schedules/tsconfig.json b/apps/schedules/tsconfig.json index 8d3088b4c..3c0b02bc0 100644 --- a/apps/schedules/tsconfig.json +++ b/apps/schedules/tsconfig.json @@ -1,13 +1,13 @@ { - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "Node", - "strict": true, - "skipLibCheck": true, - "outDir": "dist", - "jsx": "react-jsx", - "jsxImportSource": "hono/jsx" - }, - "exclude": ["node_modules", "dist"] + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "Node", + "strict": true, + "skipLibCheck": true, + "outDir": "dist", + "jsx": "react-jsx", + "jsxImportSource": "hono/jsx" + }, + "exclude": ["node_modules", "dist"] } diff --git a/package.json b/package.json index 6f24cce5f..620d27fde 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "dokploy:build": "pnpm --filter=dokploy run build", "dokploy:start": "pnpm --filter=dokploy run start", "test": "pnpm --filter=dokploy run test", - "builder:dev": "pnpm --filter=builders run dev", + "server:dev": "pnpm --filter=server run dev", "docker:build:canary": "./apps/dokploy/docker/build.sh canary", "docs:dev": "pnpm --filter=docs run dev", "docs:build": "pnpm --filter=docs run build",