You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,11 @@
9
9
A solution for watching your Docker® containers running via Docker Compose for image updates and automatically restarting the compositions whenever an image is refreshed.
10
10
11
11
## Overview
12
-
Compose Updater is an application which continuously monitors your running docker containers. When a base image is changed, the updated version gets pulled (or built via --pull) from the registry and the docker compose composition gets restarted (via down and up -d).
12
+
Compose Updater is an application which continuously monitors your running docker containers. When an image is updated, the updated version gets pulled (or built via --pull) from the registry and the docker compose composition gets restarted (via down and up -d).
13
+
14
+
Compose Updater is useful for your when you're using image tags which are updated regularly (such as ```image:latest``` or a specific major version like ```image:v3```).
15
+
16
+
Currently, Compose Updater doesn't help you when your're using image tags that won't change (such as an unchangable SemVer, i.e. ```image:1.2.3```). It won't update your Docker Compose files to use newer image tags.
13
17
14
18
## Usage
15
19
### 1. Prepare your services
@@ -67,8 +71,32 @@ CLEANUP | -cleanup | 0 | Run docker system prune -a -f after each run
67
71
ONCE | -once | 0 | Run once and exit
68
72
PRINT_SETTINGS | -printSettings | 1 | Print settings on start
69
73
UPDATE_LOG | -updateLog | '' | Log file for updates and restarts
70
-
71
-
# License
74
+
BUILD | -build | 0 | Build the image of a service with "build:" section in YAML file every run
You can connect Compose Updater to an MQTT Broker (such as Eclispe Mosquitto or HiveMQ). This way, the actions of each run (i.e. image pulls, composition restarts) are published to an MQTT topic. You can use these informations to send push notifications using a solution like [mqttwarn](https://github.com/jpmens/mqttwarn).
83
+
84
+
To connect to an MQTT broker, specify the required connection parameters in the settings (see above).
85
+
86
+
Compose Updater published the following topics:
87
+
88
+
Topic | Corresponding event | Example content
89
+
--- | --- | ---
90
+
update | On update run start and done | 'start' or 'done'
91
+
update/composition/start | On start checking for updates for a specific Docker Composition | YAML File Path
92
+
update/composition/restart/dry | On skipping composition restart due to dry-run | YAML File Path
93
+
update/composition/restart/skip | On skipping composition restart due to no updated found | YAML File Path
94
+
update/composition/restart/start | On restarting a composition | ```{"composeFile": "/path/to/docker-compose.yml", "services":[{"name": "service1", "image": "image:tag"}]}```
95
+
update/composition/restart/done | On finished restarting a composition | ```{"composeFile": "/path/to/docker-compose.yml", "services":[{"name": "service1", "image": "image:tag"}]}```
96
+
update/composition/service/built | On service's image built | ```{"composeFile": "/path/to/docker-compose.yml", "services":[{"name": "service1", "image": "image:tag"}]}```
//s.boolFlagEnv(&s.CompleteStop, "completeStop", "COMPLETE_STOP", false, "Restart all services in docker-compose.yml (even unmanaged) after a new image is pulled")
36
41
s.boolFlagEnv(&s.Build, "build", "BUILD", false, "Rebuild images of services with 'build' definition")
0 commit comments