Update your deployed dokku apps with n8n
Connecting to your dokku server to update an app is a time-consuming task, this workflow lets you do it faster with n8n
Do you have a dokku server, and do you want to periodically update your application without logging into your server? This workflow does that!
This simple workflow runs weekly via the cron schedule node or when we desire with a manual trigger. It gets the last version available from GitHub, connects over ssh to the server, and issues the command to update the application. Once the ssh command ends, it sends a notification to my preferred notification service, home assistant in my case.
If the schedule doesn't fit, you're free to change it or remove it altogether. This workflow is a great candidate for combinations with other workflows. One great example I can think of is a telegram bot, allowing you to trigger app updates by speaking to a chatbot.
Another one may be a Ci pipeline, where this workflow executes after actions are taken on your git repo.
You're also free to change the notification service to something of your liking.
Some configurations needed to run this workflow are: an ssh private key file, GitHub OAuth app credentials, and the credentials for your notifications service
The workflow is so flexible, that you can even use it to update dokku itself by changing the ssh command. You can find the expression I used for the dokku update below if you're registered to the blog.
The workflow file below is only available to registered users, please register for free to my blog if you want to download it.