Slack notifications for deployment #2210
marko-hologram
started this conversation in
New Features
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, first of all thank you again for making Coolify. Love using it so far!
Unfortunately, as this software is broad in scope, there are inevitably some things that are missing for some of us using it.
I do see that there are already Notifications as a feature, which is nice, but I think Email, Telegram and Discord are kinda limiting here. Many companies use Slack as a hub for all messaging and these types of notifications are no different.
Many other tools already have Slack integration because it's such a popular messaging app and many teams use these integrations.
Ideas
Opt-in by default
By default, Notifications are disabled and are opt-in. This makes sense because they do require integration with Slack API and some setup.
Per resource notifications
I work in an agency and we work on many projects in parallel. Global notifications that go into a single channel are too much spam and people usually mute these type of channels which then makes them useless because nobody is looking at them.
What I would ideally prefer is per resource notifications. I specifically highlight the per resource part because I think that's important. Per project notifications would be ok, but still not ideal. Let's say that in a project's staging environment I have 3 resources deployed, 1 database, 1 backend service and 1 frontend application. I only care when backend and frontend are deployed. In case database gets updated to latest version or re-deployed for some reason, that's not really something the rest of the team needs to be spammed about.
I would also prefer per resource notifications because you might just want to send notifications for "production" environment and not "staging" environment.
Sending notifications to any Slack channel
Current Notifications in Coolify work fine if you are a solo developer or a single team, but in a multi team environment they are not enough. Having global Notification settings that assume all notifications go into a single channel of communication is limiting and results in spam and in notifications being ignored as I mentioned above.
Ideally, notifications could be sent to any channel in a specific Slack workspace by specifying the ID of the channel. ID would be preferred to channel name because ID is unique and cannot be updated, unlike channel name. ID is more resilient.
If you work in an agency like I do, this is crucial because it means that messages can be delivered into channels that are actually related to that project. Just dumping everything into a single channel is horrible and messy and it also means people that work on a single project will get spammed with notifications from X other projects.
Custom notification message
Ideally, each enabled notification message can be edited to send a custom message for that specific resource. It would be great if messages can be templated in some way to make them dynamic.
For example, something like this:
Would send a message like this:
With a custom template message like this, same message can be used across the board if a team wants to have a standard message shape. Values in brackets (
{{ }}
) would get replaced with their actual values for that deployment.Things I would love to have as variables in these messages are:
Color coded messages
For example, Jenkins Slack integration adds simple color coding to messages which can quickly tell you if something is ok or it failed.
Here is an example:
Content of these messages is cut off because I cannot show that information and it's irrelevant really for this.
Preview deployments
Ideally, notifications for these can be enabled/disabled on a per resource basis. If a project has many PRs daily, these can turn into spam. They don't necessarily need to be sent to a channel to notify everyone, including non developer people present in the channel. Staging/Production environment deployments are more valuable to the broader audience like product managers, designers, QA and sales.
Existing integrations / Inspiration
I think Jenkins does this Slack integration right (https://plugins.jenkins.io/slack/) and I've based most of my ideas on that.
It allows you to specify global channel ID where messages go by default, but it also allows per project override of these options. You can also send messages on successful deploy, failed deploy, unstable deploy etc. based on status values that Jenkins has for deploys. For Coolify this would most likely be just Success and Fail/Error I guess?
How can I help?
And lastly, how can I help with this? I didn't just want to randomly start poking into Coolify because this is a decent chunk of work and I saw you prefer suggestions/proposals before any serious work is being done.
If I can somehow help with this, please let me know.
Beta Was this translation helpful? Give feedback.
All reactions