fix: pass giteaId (Dokploy Gitea integration ID) when saving Gitea provider

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 })
This commit is contained in:
Z User committed 2026-10-29 21:48:25 +00:00
1 parent 133905a0fb
commit 7166c51680
1 file changed
+5 -2
+5 -2
View File
@@ -26,6 +26,7 @@ export interface DokployConfig {
apiKey: string apiKey: string
environmentId?: string environmentId?: string
serverId?: string | null serverId?: string | null
giteaId?: string | null // Dokploy's Gitea integration ID (for cloning repos)
} }
export interface DokployApp { export interface DokployApp {
@@ -138,7 +139,7 @@ export function createDokployClient(config: DokployConfig) {
repository: string repository: string
branch: string branch: string
buildPath?: string | null buildPath?: string | null
id?: string | null giteaId?: string | null
}): Promise<void> { }): Promise<void> {
await call('/application.saveGiteaProvider', { await call('/application.saveGiteaProvider', {
applicationId: input.applicationId, applicationId: input.applicationId,
@@ -146,7 +147,7 @@ export function createDokployClient(config: DokployConfig) {
giteaRepository: input.repository, giteaRepository: input.repository,
giteaBranch: input.branch, giteaBranch: input.branch,
giteaBuildPath: input.buildPath ?? '/', giteaBuildPath: input.buildPath ?? '/',
giteaId: input.id ?? null, giteaId: input.giteaId ?? null,
}) })
} }
@@ -359,6 +360,7 @@ export function createDokployClient(config: DokployConfig) {
repository: repo, repository: repo,
branch: input.gitBranch, branch: input.gitBranch,
buildPath: input.buildPath ?? '/', buildPath: input.buildPath ?? '/',
giteaId: config.giteaId ?? null,
}) })
} else { } else {
// Generic git // Generic git
@@ -473,5 +475,6 @@ export function createDokployClientFromEnv(): DokployClient | null {
apiKey, apiKey,
environmentId: process.env.DOKPLOY_ENVIRONMENT_ID, environmentId: process.env.DOKPLOY_ENVIRONMENT_ID,
serverId: process.env.DOKPLOY_SERVER_ID ?? null, serverId: process.env.DOKPLOY_SERVER_ID ?? null,
giteaId: process.env.DOKPLOY_GITEA_ID ?? null,
}) })
} }