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
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<void> {
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,
})
}