diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 2ac54229..e9591f3c 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -12,7 +12,7 @@ jobs: - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: - node-version: 20.9.0 + node-version: 20.16.0 cache: "pnpm" - run: pnpm install --frozen-lockfile - run: pnpm run server:build @@ -26,7 +26,7 @@ jobs: - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: - node-version: 20.9.0 + node-version: 20.16.0 cache: "pnpm" - run: pnpm install --frozen-lockfile - run: pnpm run server:build @@ -39,7 +39,7 @@ jobs: - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: - node-version: 20.9.0 + node-version: 20.16.0 cache: "pnpm" - run: pnpm install --frozen-lockfile - run: pnpm run server:build diff --git a/.nvmrc b/.nvmrc index 43bff1f8..593cb75b 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.9.0 \ No newline at end of file +20.16.0 \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a69fa686..0ac5a358 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,7 +52,7 @@ feat: add new feature Before you start, please make the clone based on the `canary` branch, since the `main` branch is the source of truth and should always reflect the latest stable release, also the PRs will be merged to the `canary` branch. -We use Node v20.9.0 and recommend this specific version. If you have nvm installed, you can run `nvm install 20.9.0 && nvm use` in the root directory. +We use Node v20.16.0 and recommend this specific version. If you have nvm installed, you can run `nvm install 20.16.0 && nvm use` in the root directory. ```bash git clone https://github.com/dokploy/dokploy.git diff --git a/apps/dokploy/.nvmrc b/apps/dokploy/.nvmrc index 43bff1f8..593cb75b 100644 --- a/apps/dokploy/.nvmrc +++ b/apps/dokploy/.nvmrc @@ -1 +1 @@ -20.9.0 \ No newline at end of file +20.16.0 \ No newline at end of file diff --git a/apps/dokploy/__test__/drop/drop.test.test.ts b/apps/dokploy/__test__/drop/drop.test.test.ts index 74a4eb66..e4588dd4 100644 --- a/apps/dokploy/__test__/drop/drop.test.test.ts +++ b/apps/dokploy/__test__/drop/drop.test.test.ts @@ -105,6 +105,7 @@ const baseApp: ApplicationNested = { ports: [], projectId: "", publishDirectory: null, + isStaticSpa: null, redirects: [], refreshToken: "", registry: null, diff --git a/apps/dokploy/__test__/traefik/traefik.test.ts b/apps/dokploy/__test__/traefik/traefik.test.ts index 5437e64d..6c136b25 100644 --- a/apps/dokploy/__test__/traefik/traefik.test.ts +++ b/apps/dokploy/__test__/traefik/traefik.test.ts @@ -85,6 +85,7 @@ const baseApp: ApplicationNested = { ports: [], projectId: "", publishDirectory: null, + isStaticSpa: null, redirects: [], refreshToken: "", registry: null, diff --git a/apps/dokploy/components/dashboard/application/build/show.tsx b/apps/dokploy/components/dashboard/application/build/show.tsx index 9535a318..fbefab6d 100644 --- a/apps/dokploy/components/dashboard/application/build/show.tsx +++ b/apps/dokploy/components/dashboard/application/build/show.tsx @@ -12,6 +12,7 @@ import { FormMessage, } from "@/components/ui/form"; import { Input } from "@/components/ui/input"; +import { Checkbox } from "@/components/ui/checkbox"; import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"; import { api } from "@/utils/api"; import { zodResolver } from "@hookform/resolvers/zod"; @@ -63,10 +64,11 @@ const mySchema = z.discriminatedUnion("buildType", [ publishDirectory: z.string().optional(), }), z.object({ - buildType: z.literal(BuildType.static), + buildType: z.literal(BuildType.railpack), }), z.object({ - buildType: z.literal(BuildType.railpack), + buildType: z.literal(BuildType.static), + isStaticSpa: z.boolean().default(false), }), ]); @@ -83,6 +85,7 @@ interface ApplicationData { dockerBuildStage?: string | null; herokuVersion?: string | null; publishDirectory?: string | null; + isStaticSpa?: boolean | null; } function isValidBuildType(value: string): value is BuildType { @@ -115,6 +118,7 @@ const resetData = (data: ApplicationData): AddTemplate => { case BuildType.static: return { buildType: BuildType.static, + isStaticSpa: data.isStaticSpa ?? false, }; case BuildType.railpack: return { @@ -174,6 +178,8 @@ export const ShowBuildChooseForm = ({ applicationId }: Props) => { data.buildType === BuildType.heroku_buildpacks ? data.herokuVersion : null, + isStaticSpa: + data.buildType === BuildType.static ? data.isStaticSpa : null, }) .then(async () => { toast.success("Build type saved"); @@ -364,6 +370,30 @@ export const ShowBuildChooseForm = ({ applicationId }: Props) => { )} /> )} + {buildType === BuildType.static && ( + ( + + +
+ + + Single Page Application (SPA) + +
+
+ +
+ )} + /> + )}