diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 987800f9..8ca65d52 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -70,10 +70,12 @@ jobs: file: ./Dockerfile.cloud push: true tags: | - siumauricio/cloud:${{ github.ref_name == 'main' && 'main' || 'canary' }} + siumauricio/cloud:${{ github.ref_name == 'main' && 'latest' || 'canary' }} platforms: linux/amd64 build-args: | - NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${{ github.ref_name == 'main' && 'pk_live_51QAm7bF3cxQuHeOzMpfNfJIch6oLif8rS32pRE392CdTbBf0MYBdbapAxarQGspqJBWT2nVOxu8e6ZHrHB4NhVHG008DE2A90d' || 'pk_test_51QAm7bF3cxQuHeOz0xg04o9teeyTbbNHQPJ5Tr98MlTEan9MzewT3gwh0jSWBNvrRWZ5vASoBgxUSF4gPWsJwATk00Ir2JZ0S1' }} + NEXT_PUBLIC_UMAMI_HOST=${{ secrets.NEXT_PUBLIC_UMAMI_HOST }} + NEXT_PUBLIC_UMAMI_WEBSITE_ID=${{ secrets.NEXT_PUBLIC_UMAMI_WEBSITE_ID }} + NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=${{ secrets.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY }} build-and-push-schedule-image: runs-on: ubuntu-latest @@ -95,7 +97,7 @@ jobs: file: ./Dockerfile.schedule push: true tags: | - siumauricio/schedule:${{ github.ref_name == 'main' && 'main' || 'canary' }} + siumauricio/schedule:${{ github.ref_name == 'main' && 'latest' || 'canary' }} platforms: linux/amd64 @@ -119,5 +121,5 @@ jobs: file: ./Dockerfile.server push: true tags: | - siumauricio/server:${{ github.ref_name == 'main' && 'main' || 'canary' }} + siumauricio/server:${{ github.ref_name == 'main' && 'latest' || 'canary' }} platforms: linux/amd64 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index bb5310f2..74b70db0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,6 @@ 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 664180f7..020ea3d6 100644 --- a/Dockerfile.cloud +++ b/Dockerfile.cloud @@ -14,10 +14,16 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm --filter=@dokploy/server # Deploy only the dokploy app +ARG NEXT_PUBLIC_UMAMI_HOST +ENV NEXT_PUBLIC_UMAMI_HOST=$NEXT_PUBLIC_UMAMI_HOST + +ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID +ENV NEXT_PUBLIC_UMAMI_WEBSITE_ID=$NEXT_PUBLIC_UMAMI_WEBSITE_ID + ARG NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY ENV NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=$NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY + 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.schedule b/Dockerfile.schedule index 36f06aef..5eca3420 100644 --- a/Dockerfile.schedule +++ b/Dockerfile.schedule @@ -15,7 +15,6 @@ 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 9cf04b21..a25b22e5 100644 --- a/Dockerfile.server +++ b/Dockerfile.server @@ -15,7 +15,6 @@ 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/apps/api/src/types.ts b/apps/api/src/types.ts deleted file mode 100644 index 2547432b..00000000 --- a/apps/api/src/types.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface LemonSqueezyLicenseResponse { - valid: boolean; - error?: string; - meta?: { - store_id: string; - order_id: number; - order_item_id: number; - product_id: number; - product_name: string; - variant_id: number; - variant_name: string; - customer_id: number; - customer_name: string; - customer_email: string; - }; -} diff --git a/apps/api/src/utils.ts b/apps/api/src/utils.ts index 5d776a5c..03c836e0 100644 --- a/apps/api/src/utils.ts +++ b/apps/api/src/utils.ts @@ -1,45 +1,12 @@ import { - deployApplication, - deployCompose, deployRemoteApplication, deployRemoteCompose, - rebuildApplication, - rebuildCompose, rebuildRemoteApplication, rebuildRemoteCompose, updateApplicationStatus, updateCompose, -} from "@dokploy/server/dist"; +} from "@dokploy/server"; import type { DeployJob } from "./schema"; -import type { LemonSqueezyLicenseResponse } from "./types"; - -// const LEMON_SQUEEZY_API_KEY = process.env.LEMON_SQUEEZY_API_KEY; -// const LEMON_SQUEEZY_STORE_ID = process.env.LEMON_SQUEEZY_STORE_ID; -// export const validateLemonSqueezyLicense = async ( -// licenseKey: string, -// ): Promise => { -// try { -// const response = await fetch( -// "https://api.lemonsqueezy.com/v1/licenses/validate", -// { -// method: "POST", -// headers: { -// "Content-Type": "application/json", -// "x-api-key": LEMON_SQUEEZY_API_KEY as string, -// }, -// body: JSON.stringify({ -// license_key: licenseKey, -// store_id: LEMON_SQUEEZY_STORE_ID as string, -// }), -// }, -// ); - -// return response.json(); -// } catch (error) { -// console.error("Error validating license:", error); -// return { valid: false, error: "Error validating license" }; -// } -// }; export const deploy = async (job: DeployJob) => { try { diff --git a/apps/docs/app/[lang]/layout.tsx b/apps/docs/app/[lang]/layout.tsx index aa0d2c63..67583026 100644 --- a/apps/docs/app/[lang]/layout.tsx +++ b/apps/docs/app/[lang]/layout.tsx @@ -14,6 +14,7 @@ import { PlugZapIcon, TerminalIcon, } from "lucide-react"; +import Script from "next/script"; const inter = Inter({ subsets: ["latin"], }); @@ -63,6 +64,10 @@ export default function Layout({ className={inter.className} suppressHydrationWarning > +