Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcasimir/docker-autoheal
Restart unhealthy containers based on healthchecks
https://github.com/mcasimir/docker-autoheal
Last synced: about 2 months ago
JSON representation
Restart unhealthy containers based on healthchecks
- Host: GitHub
- URL: https://github.com/mcasimir/docker-autoheal
- Owner: mcasimir
- Created: 2016-07-03T23:41:06.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-08T10:22:33.000Z (about 8 years ago)
- Last Synced: 2024-07-22T10:48:51.755Z (2 months ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 10
- Watchers: 6
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-autoheal
Monitors docker events and restarts unhealthy containers.
The healthiness of the container is assessed through configurable healthcheck commands.
## Usage
### Start the monitor
``` sh
docker run -d -v /var/run/docker.sock:/var/run/docker.sock mcasimir/docker-autoheal
```### Start your container
Starts your containers with some labels to enable the autoheal:
``` sh
docker run \
-l com.github.mcasimir.autoheal.check.cmd="curl -f -I --connect-timeout 1 -X HEAD http://127.0.0.1:3000" \
my-container-image
```#### Monitored container label options
| label |type | default | description |
|-----|-----|-----------|-------------|
|`com.github.mcasimir.autoheal.check.grace`|`number`|`15000`|Grace period between last container start/restart and first healthcheck|
|`com.github.mcasimir.autoheal.check.frequency`|`number`|`5000`|Healthcheck frequency|