Preview deployments not working due to redirect

Preview deployments don't work due to webhook requests responding with 301 {"message":"Branch Not Match"} . Regular deployments work as intended
4 Replies
knowsuchagency
knowsuchagencyOP3mo ago
The base branch is main which is the branch normal deployments use
Siumauricio
Siumauricio3mo ago
Preview deployments inherit the redirects or security from your main application https://docs.dokploy.com/docs/core/applications/preview-deployments#automatic-updates
Preview Deployments | Dokploy
Preview deployments allow you to test and review your application changes in an isolated environment before merging to production.
knowsuchagency
knowsuchagencyOP3mo ago
All events fail except push events to the main branch with the same 301 response body {"message":"Branch Not Match"}
No description
knowsuchagency
knowsuchagencyOP2mo ago
this is consident across projects Here's my traefik.yml
providers:
swarm:
exposedByDefault: false
watch: false
docker:
exposedByDefault: false
file:
directory: /etc/dokploy/traefik/dynamic
watch: true
entryPoints:
web:
address: ':80'
websecure:
address: ':443'
http:
tls:
certResolver: letsencrypt
api:
insecure: true
certificatesResolvers:
letsencrypt:
acme:
storage: /etc/dokploy/traefik/dynamic/acme.json
httpChallenge:
entryPoint: web
accessLog:
filePath: /etc/dokploy/traefik/dynamic/access.log
format: json
bufferingSize: 100
filters:
retryAttempts: true
minDuration: 10ms
providers:
swarm:
exposedByDefault: false
watch: false
docker:
exposedByDefault: false
file:
directory: /etc/dokploy/traefik/dynamic
watch: true
entryPoints:
web:
address: ':80'
websecure:
address: ':443'
http:
tls:
certResolver: letsencrypt
api:
insecure: true
certificatesResolvers:
letsencrypt:
acme:
storage: /etc/dokploy/traefik/dynamic/acme.json
httpChallenge:
entryPoint: web
accessLog:
filePath: /etc/dokploy/traefik/dynamic/access.log
format: json
bufferingSize: 100
filters:
retryAttempts: true
minDuration: 10ms
I host dokploy and all application behind cloudflare for DNS in strict mode for HTTPS using origin certs My assumption might be that it's redirecting non-http traffic, but all events have that same body in the response, {"message":"Branch Not Match"} which makes me suspect it's something to how dokploy configures github webhooks I found the issue. The problem was using an explicit webhook as opposed to the github application. I had to turn off the webhook ensure the github app was correctly configured. Hope this helps if anyone else stumbles across the same problem!

Did you find this page helpful?