New GitHub-sourced Applications never execute git clone before build (pre-existing apps still clone fine)
To Reproduce
- Create a new Application in Dokploy
- Select "GitHub" as the source provider (via installed GitHub App, org has "All repositories" access)
- Select a private repository owned by a GitHub Organization
- Select "Dockerfile" as build type, Dockerfile Path = "Dockerfile", Docker Context Path = "."
- Save the application
- Trigger a Deploy
- Inspect the deploy script executed on the server (visible via
docker logs <dokploy_container_id>) - Observe that the script never includes the expected
rm -rf code; mkdir -p code; git clone ...block, and instead jumps straight to writing .env and runningdocker build, causing the build to fail becausecode/was never created/populated
For comparison: 9. Redeploy an Application that already existed before this issue appeared (same server, unrelated repo/org, no config changes) this one still clones correctly every time
Current vs. Expected behavior
Expected:
Every deploy of a GitHub-sourced Application should clone/re-clone the repository into the app's code/ directory before writing .env and running docker build.
Current: For newly created Applications, the generated deploy script completely omits the clone step. Example of the actual generated script for a broken (new) app:
(set -e; echo "" | base64 -d > "/etc/dokploy/applications//code/.env"; echo 'Building '; cd /etc/dokploy/applications//code || { echo '❌ The path .../code does not exist'; exit 1; } docker build -t -f .../code/Dockerfile .../code || { ... } )
Resulting error: /bin/sh: 1: cannot create /etc/dokploy/applications//code/.env: Directory nonexistent
or, if the folder is manually pre-created empty: cd: can't cd to /etc/dokploy/applications//code/ ❌ The path .../code/ does not exist
Meanwhile, the working script for a pre-existing app looks like this (includes the clone block):
(set -e;set -e; rm -rf /etc/dokploy/applications//code; mkdir -p /etc/dokploy/applications//code; echo "Cloning Repo github.com//.git to .../code: ✅"; git clone --branch --depth 1 https://oauth2:@github.com//.git .../code --progress; echo "" | base64 -d > ".../code/.env"; ... docker build ... )
At one point (before recreating the app from scratch), the broken script instead contained a hardcoded failure stub: echo "Error: ❌ Github Provider not found"; exit 1; even though the GitHub App was correctly installed on the organization with "All repositories" access. After recreating the app, this explicit error message disappeared, but the clone block was still never generated the script just silently proceeds to the build step with an empty/missing code/ directory.
This has been reproduced consistently while trying every remediation:
- Recreating the Application (multiple times, new IDs each time)
- Recreating the entire Project from scratch
- Deleting and recreating the Git Provider entry for the organization in Dokploy Settings
- Fully uninstalling and reinstalling the GitHub App on the GitHub organization
- Switching source type from "GitHub" to generic "Git" and back to "GitHub"
- Using the "Duplicate application" feature on a known good existing app
- Restarting the Dokploy container/service
- Upgrading Dokploy (auto-updated mid-troubleshooting) from v0.29.12 to v0.30.6, and rolling the Swarm service back to v0.29.12 bug persisted identically in both versions, suggesting a Postgres data-level issue rather than something tied to one image tag/version.
Critically: this reproduces for brand new Applications pointing at completely unrelated repos, all using Dockerfile build type, across repos under two different GitHub Organizations and one personal account, while Applications that already existed on this same server before the issue first appeared continue to redeploy successfully today, unchanged.
Provide environment information
Operating System:
OS: Ubuntu
Arch: x86_64
Dokploy version: reproduced on both v0.29.12 and v0.30.6
VPS Provider: self-hosted custom VPS
What applications/services are you tying to deploy?
Spring Boot / Kotlin app, Dockerfile build type (reproduced across multiple repos, all using Dockerfile build type)Which area(s) are affected? (Select all that apply)
Installation, Application
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
No response
Will you send a PR to fix it?
No
Source: Dokploy/dokploy