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