From 7166c51680e725582630bb8f39cc0e628d45ad07 Mon Sep 17 00:00:00 2001 From: Z User Date: Thu, 29 Oct 2026 21:48:25 +0000 Subject: [PATCH] fix: pass giteaId (Dokploy Gitea integration ID) when saving Gitea provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without giteaId, Dokploy can't authenticate with Gitea to clone repos. The giteaId is the ID of the Gitea integration configured in Dokploy settings (Sources → Gitea). Added DOKPLOY_GITEA_ID env var to pass this ID from environment. The provisioning flow now: saveGiteaProvider({ giteaId: config.giteaId }) --- src/lib/dokploy.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/dokploy.ts b/src/lib/dokploy.ts index 335e963..a6ec6fa 100755 --- a/src/lib/dokploy.ts +++ b/src/lib/dokploy.ts @@ -26,6 +26,7 @@ export interface DokployConfig { apiKey: string environmentId?: string serverId?: string | null + giteaId?: string | null // Dokploy's Gitea integration ID (for cloning repos) } export interface DokployApp { @@ -138,7 +139,7 @@ export function createDokployClient(config: DokployConfig) { repository: string branch: string buildPath?: string | null - id?: string | null + giteaId?: string | null }): Promise { await call('/application.saveGiteaProvider', { applicationId: input.applicationId, @@ -146,7 +147,7 @@ export function createDokployClient(config: DokployConfig) { giteaRepository: input.repository, giteaBranch: input.branch, giteaBuildPath: input.buildPath ?? '/', - giteaId: input.id ?? null, + giteaId: input.giteaId ?? null, }) } @@ -359,6 +360,7 @@ export function createDokployClient(config: DokployConfig) { repository: repo, branch: input.gitBranch, buildPath: input.buildPath ?? '/', + giteaId: config.giteaId ?? null, }) } else { // Generic git @@ -473,5 +475,6 @@ export function createDokployClientFromEnv(): DokployClient | null { apiKey, environmentId: process.env.DOKPLOY_ENVIRONMENT_ID, serverId: process.env.DOKPLOY_SERVER_ID ?? null, + giteaId: process.env.DOKPLOY_GITEA_ID ?? null, }) }