Skip to content

Commit

Permalink
Post to default channel set in Webhook page
Browse files Browse the repository at this point in the history
  • Loading branch information
int128 committed Oct 25, 2014
1 parent a834f75 commit 36194eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@ A Slack integration to notify Docker events.

![slack-docker-0.1.1](https://cloud.githubusercontent.com/assets/321266/4773935/0141e0e8-5ba8-11e4-8b35-601e898c58be.png)

## Run
## How to Run

Set up [an incoming WebHook integration](https://my.slack.com/services/new/incoming-webhook) and get the token.
Set up [an incoming WebHook integration](https://my.slack.com/services/new/incoming-webhook) and get the Webhook URL.

Run a container
Run a container as follows:

```sh
docker run -d -v /var/run/docker.sock:/var/run/docker.sock -e webhook=URL -e channel=infra int128/slack-docker
docker run -d -e webhook=URL -v /var/run/docker.sock:/var/run/docker.sock int128/slack-docker
```

with following environment variables.

* `webhook` is the Webhook URL like `https://hooks.slack.com/services/...`
* `channel` is the channel without hash prefix. Default is `general`.
Replace `URL` with your Webhook URL like `https://hooks.slack.com/services/...`


## Contribution
Expand Down
2 changes: 1 addition & 1 deletion app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ notify = (name, text, fields) ->
slack.send
username: "docker#{name}"
icon_emoji: ':whale:'
channel: '#' + process.env.channel || 'general'
channel: ''
text: text
fields: fields

Expand Down

0 comments on commit 36194eb

Please sign in to comment.