-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What do you do after installation? #5
Comments
Haven't set it up, but it looks like you direct all requests to your mattermost server to this proxy (default port 5000) and configure it to forward to your mattermost server. I could be wrong. Yes, needs some more docs |
Same question. Then, .... how could I specify my Mattermost channel to send notify? |
ok, I saw the source code: I think I should create a webhook on Bitbucket that like: Am I right? |
I thought that:
Sorry, bad idea, channel specify in URL params will be better. |
I'm proxying mattermost through apache. My apache vhost config, relevant to mattermost, looks like this:
Please note the relevant part for handling requests from bitbucket:
Per the above, I've decided to use port 8064 for this bridge to listen:
I set up a new hook in mattermost, which generates a url with format: With this, the request from bitbucket comes into the web server (on port 443, handled by Apache). Apache detects a request to Thus, two general scenarios are handled:
There are probably better ways; maybe I should have used a This should be enough for someone to get going. This functionality will be integrated into Mattermost sooner or later, anyway. |
It occurred to me that it would be better to look for something in the header to identify that the request is a bitbucket hook. This way the URL that is generated by Mattermark can be added to bitbucket directly, without modification. When bitbucket sends a request to your server, there's probably a header that identifies that the request is related to a bitbucket hook. Better to use that instead of changing the URI around. |
@GTcode good work. I got a Caddy server as a proxy:
And as you can see, MM runs on backend.server.tw:8065 . Then run the bridge on backend.server.tw with docker:
The last, setup a webhook on repo in Bitbucket: If the But !!! |
Yes, it might be easier to simply open up port 5000 on your server, and accept the request directly into the python bridge. Still need to customize the URL given by Mattermost before adding it to bitbucket. It's just that I prefer to have a single port open, with TLS encryption handled by a proper web server. In a production environment you will probably want to have, at least, a web server proxying the requests anyway. That's why I jumped through some small hurdles to unify everything in Apache. In any case, the bridge itself is a work-around anyway. Any techniques described here are temporary. It's only a matter of time before Mattermost integrates this type of functionality. |
That's true :-( |
Followed your readme and installed the bridge without issues - but not quite sure what to do next!
Can you direct me to any other documentation on configuration?
Many thanks
Dave
The text was updated successfully, but these errors were encountered: