From 5058d9b47dc095666e9e16cb442e6419315596e8 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 7 Dec 2024 21:28:34 -0600 Subject: [PATCH] Merge branch 'canary' into 379-preview-deployment --- CONTRIBUTING.md | 2 +- Dockerfile | 1 - Dockerfile.cloud | 1 - apps/dokploy/__test__/drop/drop.test.test.ts | 1 + apps/dokploy/__test__/traefik/traefik.test.ts | 1 + .../advanced/volumes/add-volumes.tsx | 13 +- .../advanced/volumes/update-volume.tsx | 16 +- .../dashboard/application/build/show.tsx | 32 +++ .../dashboard/application/general/show.tsx | 46 +-- .../dashboard/compose/general/actions.tsx | 49 ++-- .../dashboard/compose/start-compose.tsx | 65 +++++ .../dashboard/compose/stop-compose.tsx | 65 +++++ .../docker/terminal/docker-terminal-modal.tsx | 42 ++- .../components/dashboard/requests/columns.tsx | 5 +- .../dashboard/settings/appearance-form.tsx | 39 +-- .../notifications/add-notification.tsx | 2 +- .../web-server/docker-terminal-modal.tsx | 42 ++- apps/dokploy/components/ui/switch.tsx | 6 +- .../drizzle/0047_red_stephen_strange.sql | 60 ---- apps/dokploy/drizzle/0047_tidy_revanche.sql | 1 + .../drizzle/0048_clumsy_matthew_murdock.sql | 1 - apps/dokploy/drizzle/0048_flat_expediter.sql | 1 + apps/dokploy/drizzle/0049_overrated_sage.sql | 1 + apps/dokploy/drizzle/0049_useful_mole_man.sql | 3 - apps/dokploy/drizzle/meta/0047_snapshot.json | 260 +---------------- apps/dokploy/drizzle/meta/0048_snapshot.json | 271 +----------------- apps/dokploy/drizzle/meta/0049_snapshot.json | 11 +- apps/dokploy/drizzle/meta/_journal.json | 12 +- apps/dokploy/lib/languages.ts | 16 ++ apps/dokploy/next-i18next.config.cjs | 23 +- apps/dokploy/pages/_app.tsx | 13 +- apps/dokploy/pages/api/deploy/github.ts | 5 + apps/dokploy/public/locales/ko/common.json | 1 + apps/dokploy/public/locales/ko/settings.json | 44 +++ apps/dokploy/public/locales/kz/common.json | 1 + apps/dokploy/public/locales/kz/settings.json | 41 +++ apps/dokploy/public/locales/pt-br/common.json | 1 + .../public/locales/pt-br/settings.json | 44 +++ .../public/templates/triggerdotdev.svg | 2 + .../dokploy/server/api/routers/application.ts | 1 + apps/dokploy/server/api/routers/compose.ts | 15 + .../server/api/routers/notification.ts | 5 +- .../templates/pocketbase/docker-compose.yml | 2 +- apps/dokploy/templates/templates.ts | 17 +- .../triggerdotdev/docker-compose.yml | 107 +++++++ apps/dokploy/templates/triggerdotdev/index.ts | 93 ++++++ .../templates/umami/docker-compose.yml | 2 +- apps/dokploy/utils/hooks/use-locale.ts | 19 +- apps/dokploy/utils/i18n.ts | 14 +- packages/server/src/db/schema/application.ts | 3 + packages/server/src/services/compose.ts | 30 ++ packages/server/src/utils/builders/heroku.ts | 4 +- .../src/utils/notifications/build-error.ts | 33 ++- .../src/utils/notifications/build-success.ts | 29 +- .../utils/notifications/database-backup.ts | 32 ++- .../src/utils/notifications/docker-cleanup.ts | 23 +- .../utils/notifications/dokploy-restart.ts | 18 +- 57 files changed, 933 insertions(+), 754 deletions(-) create mode 100644 apps/dokploy/components/dashboard/compose/start-compose.tsx create mode 100644 apps/dokploy/components/dashboard/compose/stop-compose.tsx delete mode 100644 apps/dokploy/drizzle/0047_red_stephen_strange.sql create mode 100644 apps/dokploy/drizzle/0047_tidy_revanche.sql delete mode 100644 apps/dokploy/drizzle/0048_clumsy_matthew_murdock.sql create mode 100644 apps/dokploy/drizzle/0048_flat_expediter.sql create mode 100644 apps/dokploy/drizzle/0049_overrated_sage.sql delete mode 100644 apps/dokploy/drizzle/0049_useful_mole_man.sql create mode 100644 apps/dokploy/lib/languages.ts create mode 100644 apps/dokploy/public/locales/ko/common.json create mode 100644 apps/dokploy/public/locales/ko/settings.json create mode 100644 apps/dokploy/public/locales/kz/common.json create mode 100644 apps/dokploy/public/locales/kz/settings.json create mode 100644 apps/dokploy/public/locales/pt-br/common.json create mode 100644 apps/dokploy/public/locales/pt-br/settings.json create mode 100644 apps/dokploy/public/templates/triggerdotdev.svg create mode 100644 apps/dokploy/templates/triggerdotdev/docker-compose.yml create mode 100644 apps/dokploy/templates/triggerdotdev/index.ts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c9d1049c..91bb7049 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -241,7 +241,7 @@ export function generate(schema: Schema): Template { - Use the same name of the folder as the id of the template. - The logo should be in the public folder. -- If you want to show a domain in the UI, please add the prefix \_HOST at the end of the variable name. +- If you want to show a domain in the UI, please add the `_HOST` suffix at the end of the variable name. - Test first on a vps or a server to make sure the template works. ## Docs & Website diff --git a/Dockerfile b/Dockerfile index 838fbe4f..74b70db0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,6 @@ RUN apt-get update && apt-get install -y curl unzip apache2-utils && rm -rf /var COPY --from=build /prod/dokploy/.next ./.next COPY --from=build /prod/dokploy/dist ./dist COPY --from=build /prod/dokploy/next.config.mjs ./next.config.mjs -COPY --from=build /prod/dokploy/next-i18next.config.cjs ./next-i18next.config.cjs COPY --from=build /prod/dokploy/public ./public COPY --from=build /prod/dokploy/package.json ./package.json COPY --from=build /prod/dokploy/drizzle ./drizzle diff --git a/Dockerfile.cloud b/Dockerfile.cloud index 0f8427d4..020ea3d6 100644 --- a/Dockerfile.cloud +++ b/Dockerfile.cloud @@ -44,7 +44,6 @@ RUN apt-get update && apt-get install -y curl unzip apache2-utils && rm -rf /var COPY --from=build /prod/dokploy/.next ./.next COPY --from=build /prod/dokploy/dist ./dist COPY --from=build /prod/dokploy/next.config.mjs ./next.config.mjs -COPY --from=build /prod/dokploy/next-i18next.config.cjs ./next-i18next.config.cjs COPY --from=build /prod/dokploy/public ./public COPY --from=build /prod/dokploy/package.json ./package.json COPY --from=build /prod/dokploy/drizzle ./drizzle diff --git a/apps/dokploy/__test__/drop/drop.test.test.ts b/apps/dokploy/__test__/drop/drop.test.test.ts index 1fff60fb..c4b2ba8d 100644 --- a/apps/dokploy/__test__/drop/drop.test.test.ts +++ b/apps/dokploy/__test__/drop/drop.test.test.ts @@ -26,6 +26,7 @@ if (typeof window === "undefined") { const baseApp: ApplicationNested = { applicationId: "", + herokuVersion: "", applicationStatus: "done", appName: "", autoDeploy: true, diff --git a/apps/dokploy/__test__/traefik/traefik.test.ts b/apps/dokploy/__test__/traefik/traefik.test.ts index 54f236e2..815aa645 100644 --- a/apps/dokploy/__test__/traefik/traefik.test.ts +++ b/apps/dokploy/__test__/traefik/traefik.test.ts @@ -6,6 +6,7 @@ import { expect, test } from "vitest"; const baseApp: ApplicationNested = { applicationId: "", + herokuVersion: "", applicationStatus: "done", appName: "", autoDeploy: true, diff --git a/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx b/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx index d9dc16e7..5c6b95ca 100644 --- a/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx +++ b/apps/dokploy/components/dashboard/application/advanced/volumes/add-volumes.tsx @@ -1,3 +1,4 @@ +import { CodeEditor } from "@/components/shared/code-editor"; import { Button } from "@/components/ui/button"; import { Dialog, @@ -18,7 +19,6 @@ import { import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; -import { Textarea } from "@/components/ui/textarea"; import { cn } from "@/lib/utils"; import { api } from "@/utils/api"; import { zodResolver } from "@hookform/resolvers/zod"; @@ -150,7 +150,7 @@ export const AddVolumes = ({ - + Volumes / Mounts @@ -303,9 +303,12 @@ export const AddVolumes = ({ Content -