Skip to content

Latest commit

 

History

749 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

dokku-event-listener

Service that listens to docker events and runs dokku commands.

Requirements

  • golang 1.22+

Background

This package tails the Docker event stream for container events and performs specific actions depending on those events.

  • Container restarts that result in IP address changes will result in call to dokku nginx:build-config for the related app.
  • Containers using the on-failure restart policy that die after exhausting their maximum restart retry count will result in a call to dokku ps:rebuild for the related app. Containers using the always or unless-stopped restart policies are restarted by Docker itself and are never rebuilt, avoiding an infinite rebuild loop.

Note that this is only performed for Dokku app containers with the docker 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. Use docker inspect <container> to verify see Docker object labels.

Installation

Debian packages are available via packagecloud

For a prebuilt binaries, see the github releases page.

Building from source

A make target is provided for building the package from source.

make build

In addition, builds can be performed in an isolated Docker container:

make build-docker-image build-in-docker

Usage

# watch dokku containers
dokku-event-listener

About

Service that listens to docker events and runs dokku commands

Resources

Code of conduct

Contributing

Security policy

Stars

13 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages