Preview deployments not building from branch
Hi,
I'm trying to setup preview deployments but it doesnt seemt o be cloning the right branch. Every time I make a pull request, it builds from the main branch not from the pull request. Is anyone else having this issue?
14 Replies
no it workes for me, it deploys inside the preview deployment section that specific branch that is currently in PR
however weirdly the build is failing, and when I merged the code into the main branch and it did a "normal" deployment, it worked.. so there must be something wrong somewhere, i'm assuming the allocation of resources maybe but not sure
that's the weird part, when I cd into the preview deployment directory it has main selected instead of the PR branch
can you show how do you have the branch configured in dokploy and how do you make the PR in github?
Sure
Crap my friend reset the instance
Lemme see if I can recreate it
for me it's really weird, everything is alright, using good branch and deploying without issue (according to logs) but the status is failed and url doesn't work 😄
In my case I have this repo:

I opened the PR like this:

from Dockerfile into main
Then when you open the PR it will build the app



You are right, someone reported the issue more detailed this issue was only happening on remote applications
https://github.com/Dokploy/dokploy/issues/1175
GitHub
Preview Deployment Not Found Correctly · Issue #1175 · Dokploy/dokp...
To Reproduce Create application using GitHub Enable Preview Deployment Create a Pull Request Visit /etc/dokploy/applications/{{aplication_name_preview}}/code in host machine Execute git status When...
Hi, sry for not provid8ng more details, my friend took his time sending secrets so I couldnt get back to u in time.
Hello folks. First at all, I want thanks for provided feature. I have setup Preview Deployment, I have preview builds during pull-requests. I didn't find information in documentation relative settings.
1. Wildcard Domain: preview Deployment started only when I passed in subdomain with wild card pattern, for example: ''*.my-domain.com". Is it possible setup exactly subdomain(no wild card) all time? for example: "preview.my-domain.com" ?
Reason: app has oauth (google) that require exactly authorized origins and redirect URIs. for example callback: "https://my-domain/api/auth/callback/google" where not possible use wild cards.
From google console: "Users will be redirected to this path after they have authenticated with Google. The path will be appended with the authorization code for access, and must have a protocol. It can’t contain URL fragments, relative paths, or wildcards, and can’t be a public IP address."
Currenty I have to manually change domain after build for preview to get working app with oauth.
2. How does work Preview Path? Currently value is "/". nice to see examples.
3. How does work Preview Limit? does keep last N preview builds? nice to have more information to avoid doubts.
Thanks.
