Skip to content

Commit aa140d1

Browse files
authored
docs: revamp readme
Much of the old readme was unnecessary as the package is now built for all releases. Also added docs on what this project does. Closes dokku#14.
1 parent 9c13b30 commit aa140d1

File tree

1 file changed

+13
-48
lines changed

1 file changed

+13
-48
lines changed

README.md

Lines changed: 13 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,66 +6,31 @@ Service that listens to docker events and runs dokku commands.
66

77
- golang 1.12+
88

9-
## Usage
9+
## Background
1010

11-
### Build the binary
11+
This package tails the Docker event stream for container events and performs specific actions depending on those events.
1212

13-
> For a prebuilt binary, see the [github releases page](https://github.com/dokku/dokku-event-listener/releases).
13+
- Container restarts that result in IP address changes will result in call to `dokku nginx:build-config` for the related app.
14+
- Container restarts that exceed the maximum restart policy retry count for the given container will result in a call to `dokku ps:rebuild` for the related app.
1415

15-
A [Dockerfile](/Dockerfile.build) is provided for building the binary.
16+
Note that this is only performed for Dokku app containers with the label `com.dokku.app-name`. If the container is missing that label, then no action will be performed when that container emits events on the Docker event stream.
1617

17-
```shell
18-
# build the binary
19-
make build
20-
```
18+
## Installation
2119

22-
### Install binary
23-
24-
```shell
25-
# copy binary to your server
26-
scp build/linux/dokku-event-listener <user@your-server>:/tmp/
27-
sudo chown root:root /tmp/dokku-event-listener
28-
sudo mv /tmp/dokku-event-listener /usr/local/bin/dokku-event-listener
29-
```
20+
Debian and RPM packages are available via [packagecloud](https://packagecloud.io/dokku/dokku)
3021

31-
### Install systemd service
22+
For a prebuilt binaries, see the [github releases page](https://github.com/dokku/dokku-event-listener/releases).
3223

33-
If your system uses systemd, follow these steps:
24+
## Building from source
3425

35-
Copy the [dokku-event-listener.service](/init/systemd/dokku-event-listener.service) to your system
26+
A make target is provided for building the package from source.
3627

3728
```shell
38-
scp init/systemd/dokku-event-listener.service <user@your-server>:/tmp/
39-
```
40-
41-
On the system, change ownership to root and move to the systemd directory
42-
43-
```shell
44-
sudo chown root:root /tmp/dokku-event-listener.service
45-
sudo mv /tmp/dokku-event-listener.service /etc/systemd/system/dokku-event-listener.service
46-
```
47-
48-
### Install upstart conf
49-
50-
If your system uses upstart, follow these steps:
51-
52-
Copy the [dokku-event-listener.conf](/init/upstart/dokku-event-listener.conf) to your system
53-
54-
```shell
55-
scp init/upstart/dokku-event-listener.conf <user@your-server>:/tmp/
56-
```
57-
58-
On the system, change ownership to root and move to the upstart directory
59-
60-
```shell
61-
sudo chown root:root /tmp/dokku-event-listener.conf
62-
sudo mv /tmp/dokku-event-listener.conf /etc/init/dokku-event-listener.conf
29+
make build
6330
```
6431

65-
### Configure service
32+
In addition, builds can be performed in an isolated Docker container:
6633

6734
```shell
68-
# start the service and enable it at boot
69-
sudo systemctl start dokku-event-listener.service
70-
sudo systemctl enable dokku-event-listener.service
35+
make build-docker-image build-in-docker
7136
```

0 commit comments

Comments
 (0)