GitHub App webhook & autodeploy #186
-
Hey there, first, thanks for this project, I like it a lot. One thing is the auto deploy. It looks like I have to add the webhook for every app to every repo. Is this correct? dokploy/components/dashboard/settings/github/github-setup.tsx Lines 56 to 60 in faf24df And I am wondering why not the commented out code This is a bit confusing to me, but I'd love to implement fully automatic hooks, so I am asking what's holding us back at the moment? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello, Thanks! That code in there is purely for testing, in the end I didn't end up using that part, I just forgot to remove it. Initially it was going to be so automatically, when you install the github app, that it would have all that automated, but in the end I thought that we could have multiple git providers, like bitbucket, gitlab, gitea among others, and I preferred to handle it the other way which is directly here https://github.com/Dokploy/dokploy/blob/canary/pages/api/deploy/%5BrefreshToken%5D.ts#L202, I know it wouldn't take a lot of work to make everything automatic, however the solution we provide is pretty easy to implement and doesn't even take you 3 minutes to implement. https://docs.dokploy.com/en/docs/core/application/auto-deploy#webhook-url But really there wouldn't be much to do there, it would just be to test and make sure it works and replace that URL with the webhook we have. |
Beta Was this translation helpful? Give feedback.
@slowlydev Not really, it is a little different, because each application has its token with which we identify which application we are going to deploy, however using the webhook that gives github when installing the application sends information on which repository commit is done, I have to validate in each application and docker compose apps, which repository, branch are using and match with the body that sends github, it was not so simple, but well it did not take me long, in the next version should arrive.
#188