Skip to content

Commit 7e6348d

Browse files
committed
Fixed documentation
1 parent 641662c commit 7e6348d

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
This library is inspired by [docker-deploy-webhook](https://github.com/iaincollins/docker-deploy-webhook).
33
(Please read about MQTT protocol before proceeding with the rest of the document)
44

5-
MQTT Hook for automated deployment of images to docker-swarm on local-machines.
6-
(*Note: Please use this library only if your deployment target machine is not on the cloud or if your machine does not have a static IP address. If not, then consider using [this](https://github.com/iaincollins/docker-deploy-webhook))
5+
MQTT Hook for automated deployment of images to docker-swarm on any machine(Irrespective of global/static/dynamic/local IP).
76

87
<!-- Here is a [blog]() about how to integrate this library with gitlab-ci -->
98

109
# Docs
1110

1211
## Environment Variables
13-
**CONFIG** (*Default to 'production'*)
14-
Informs deployment process about which configuration to pick from ddm_config.json
12+
**CONFIG** (*Defaults to 'production'*)
13+
Information about which configuration to pick from ddm_config.json (Sample file described below)
1514

1615
## Docker-Config
1716
**broker_url**
@@ -32,18 +31,18 @@ Docker registry name (Ex. registry.gitlab.com)
3231
```
3332
In here you can specify different environments according to your needs. Each environment can have any number of images configured to be deployed onto the docker-swarm.
3433

35-
* **environment**
36-
It is used distinguish between different types of deployment preferences. For instance one may choose to deploy only `latest` versions on `production` while test all the versions on staging environment
37-
* **image-name:image-tag**
38-
`<image-name>` corresponds to the docker image to be deployed, whereas `<image-tag>` can be exactly the tag that you desire to deploy or it can match multiple tags based on pattern matching. *`<image-tag>` defaults to latest*.
34+
* **\<environment\>**
35+
It's used to distinguish between different types of deployment preferences(like production/staging/testing etc). For instance one may choose to deploy only `latest` versions on `production`, while deploy every single image on staging environment.
36+
* **\<image-name\>:\<image-tag\>**
37+
`<image-name>` corresponds to the docker image-name to be deployed and `<image-tag>` is the docker image-tag. `<image-tag>` also supports pattern matching (*`<image-tag>` defaults to latest*)
3938
Hence all the below patterns are valid
4039
* `helloworld` *(By default tag is `latest`)*
4140
* `helloworld:*`
4241
* `helloworld:test_*`
4342
* `helloworld:latest`
44-
* `helloworld:!danger` *(This corresponds to all images except `danger`)*
45-
For more details visit [matcher](https://www.npmjs.com/package/matcher)
46-
* **service-name**
43+
* `helloworld:!ignored` *(This corresponds to all images except `ignored` tag)*
44+
For more details of supported patterns visit [matcher](https://www.npmjs.com/package/matcher)
45+
* **\<service-name\>**
4746
Docker-swarm service name whose image is intended to be updated.
4847

4948
## Docker-Secrets
@@ -57,7 +56,7 @@ In here you can specify different environments according to your needs. Each env
5756
Docker login - password
5857

5958
## MQTT-Topic to publish
60-
docker-deploy-mqtt would subscribe to `/docker-deploy-mqtt/${ddm_token}` topic. So your CI/CD design must include a step to publish on the same MQTT Topic, with the message in the following format:
59+
docker-deploy-mqtt would subscribe to `/docker-deploy-mqtt/${ddm_token}` topic. So your CI/CD design must include a step to publish on the same MQTT Topic with the message in the following format:
6160
```JSON
6261
{
6362
"name" : "<image-name>(Without Tag)",
@@ -132,7 +131,7 @@ Get the image from [here](https://hub.docker.com/r/akashbabu256/docker-deploy-mq
132131

133132
## Caveats
134133
* Do not include (+,#) in ddm_tokens
135-
* Do not include `'` in messages as it will be replaced with `"`
134+
* Be careful when wrapping CI/CD VARIABLES in `'`(single quotes) as they will be considered as strings. Hence suggested solution is to wrap the entire string in `"`(double quotes) and then use `'`(single quotes) for inner strings.
136135

137136
## Contributions
138137
For contributions, please take up the tasks in Roadmap or If you find any potential improvement to this library, feel free to create a PR or raise an issue for the same.

0 commit comments

Comments
 (0)