mirror of
https://github.com/okxlin/appstore.git
synced 2025-07-13 12:52:18 +08:00
feat:添加autoheal到列表
This commit is contained in:
parent
7d4f04c5e4
commit
b7217eb599
2
apps/autoheal/1.2.0/.env.sample
Normal file
2
apps/autoheal/1.2.0/.env.sample
Normal file
@ -0,0 +1,2 @@
|
||||
CONTAINER_NAME="autoheal"
|
||||
ENV1='AUTOHEAL_CONTAINER_LABEL=all'
|
9
apps/autoheal/1.2.0/data.yml
Normal file
9
apps/autoheal/1.2.0/data.yml
Normal file
@ -0,0 +1,9 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: 'AUTOHEAL_CONTAINER_LABEL=all'
|
||||
edit: true
|
||||
envKey: ENV1
|
||||
labelEn: Environmental parameters
|
||||
labelZh: 环境参数
|
||||
required: true
|
||||
type: text
|
18
apps/autoheal/1.2.0/docker-compose.yml
Normal file
18
apps/autoheal/1.2.0/docker-compose.yml
Normal file
@ -0,0 +1,18 @@
|
||||
version: '3'
|
||||
services:
|
||||
autoheal:
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- ${ENV1}
|
||||
image: willfarrell/autoheal:1.2.0
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
79
apps/autoheal/README.md
Normal file
79
apps/autoheal/README.md
Normal file
@ -0,0 +1,79 @@
|
||||
# Docker Autoheal
|
||||
|
||||
Monitor and restart unhealthy docker containers.
|
||||
This functionality was proposed to be included with the addition of `HEALTHCHECK`, however didn't make the cut.
|
||||
This container is a stand-in till there is native support for `--exit-on-unhealthy` https://github.com/docker/docker/pull/22719.
|
||||
|
||||
## Supported tags and Dockerfile links
|
||||
- [`latest` (*Dockerfile*)](https://github.com/willfarrell/docker-autoheal/blob/main/Dockerfile) - Built daily
|
||||
- [`1.1.0` (*Dockerfile*)](https://github.com/willfarrell/docker-autoheal/blob/1.1.0/Dockerfile)
|
||||
- [`v0.7.0` (*Dockerfile*)](https://github.com/willfarrell/docker-autoheal/blob/v0.7.0/Dockerfile)
|
||||
|
||||
 [](http://microbadger.com/images/willfarrell/autoheal "Docker layer breakdown")
|
||||
|
||||
## How to use
|
||||
### UNIX socket passthrough
|
||||
```bash
|
||||
docker run -d \
|
||||
--name autoheal \
|
||||
--restart=always \
|
||||
-e AUTOHEAL_CONTAINER_LABEL=all \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
willfarrell/autoheal
|
||||
```
|
||||
### TCP socket
|
||||
```bash
|
||||
docker run -d \
|
||||
--name autoheal \
|
||||
--restart=always \
|
||||
-e AUTOHEAL_CONTAINER_LABEL=all \
|
||||
-e DOCKER_SOCK=tcp://HOST:PORT \
|
||||
-v /path/to/certs/:/certs/:ro \
|
||||
willfarrell/autoheal
|
||||
```
|
||||
a) Apply the label `autoheal=true` to your container to have it watched.
|
||||
|
||||
b) Set ENV `AUTOHEAL_CONTAINER_LABEL=all` to watch all running containers.
|
||||
|
||||
c) Set ENV `AUTOHEAL_CONTAINER_LABEL` to existing label name that has the value `true`.
|
||||
|
||||
Note: You must apply `HEALTHCHECK` to your docker images first. See https://docs.docker.com/engine/reference/builder/#healthcheck for details.
|
||||
See https://docs.docker.com/engine/security/https/ for how to configure TCP with mTLS
|
||||
|
||||
The certificates, and keys need these names:
|
||||
* ca.pem
|
||||
* client-cert.pem
|
||||
* client-key.pem
|
||||
|
||||
### Change Timezone
|
||||
If you need the timezone to match the local machine, you can map the `/etc/localtime` into the container.
|
||||
```
|
||||
docker run ... -v /etc/localtime:/etc/localtime:ro
|
||||
```
|
||||
|
||||
|
||||
## ENV Defaults
|
||||
```
|
||||
AUTOHEAL_CONTAINER_LABEL=autoheal
|
||||
AUTOHEAL_INTERVAL=5 # check every 5 seconds
|
||||
AUTOHEAL_START_PERIOD=0 # wait 0 seconds before first health check
|
||||
AUTOHEAL_DEFAULT_STOP_TIMEOUT=10 # Docker waits max 10 seconds (the Docker default) for a container to stop before killing during restarts (container overridable via label, see below)
|
||||
DOCKER_SOCK=/var/run/docker.sock # Unix socket for curl requests to Docker API
|
||||
CURL_TIMEOUT=30 # --max-time seconds for curl requests to Docker API
|
||||
WEBHOOK_URL="" # post message to the webhook if a container was restarted (or restart failed)
|
||||
```
|
||||
|
||||
### Optional Container Labels
|
||||
```
|
||||
autoheal.stop.timeout=20 # Per containers override for stop timeout seconds during restart
|
||||
```
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
docker build -t autoheal .
|
||||
|
||||
docker run -d \
|
||||
-e AUTOHEAL_CONTAINER_LABEL=all \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
autoheal
|
||||
```
|
20
apps/autoheal/data.yml
Normal file
20
apps/autoheal/data.yml
Normal file
@ -0,0 +1,20 @@
|
||||
name: Docker Autoheal
|
||||
tags:
|
||||
- 工具
|
||||
title: 监视和重启不正常的 docker 容器
|
||||
type: 工具
|
||||
description: 监视和重启不正常的 docker 容器
|
||||
additionalProperties:
|
||||
key: autoheal
|
||||
name: Docker Autoheal
|
||||
tags:
|
||||
- Tool
|
||||
shortDescZh: 监视和重启不正常的 docker 容器
|
||||
shortDescEn: Monitor and restart unhealthy docker containers
|
||||
type: tool
|
||||
crossVersionUpdate: true
|
||||
limit: 1
|
||||
recommend: 0
|
||||
website: https://github.com/willfarrell/docker-autoheal
|
||||
github: https://github.com/willfarrell/docker-autoheal
|
||||
document: https://github.com/willfarrell/docker-autoheal
|
2
apps/autoheal/latest/.env.sample
Normal file
2
apps/autoheal/latest/.env.sample
Normal file
@ -0,0 +1,2 @@
|
||||
CONTAINER_NAME="autoheal"
|
||||
ENV1='AUTOHEAL_CONTAINER_LABEL=all'
|
9
apps/autoheal/latest/data.yml
Normal file
9
apps/autoheal/latest/data.yml
Normal file
@ -0,0 +1,9 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: 'AUTOHEAL_CONTAINER_LABEL=all'
|
||||
edit: true
|
||||
envKey: ENV1
|
||||
labelEn: Environmental parameters
|
||||
labelZh: 环境参数
|
||||
required: true
|
||||
type: text
|
18
apps/autoheal/latest/docker-compose.yml
Normal file
18
apps/autoheal/latest/docker-compose.yml
Normal file
@ -0,0 +1,18 @@
|
||||
version: '3'
|
||||
services:
|
||||
autoheal:
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- ${ENV1}
|
||||
image: willfarrell/autoheal:latest
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
BIN
apps/autoheal/logo.png
Normal file
BIN
apps/autoheal/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
@ -12,7 +12,7 @@ additionalProperties:
|
||||
shortDescZh: 自动更新 Docker 容器基础镜像的工具
|
||||
shortDescEn: Tool to automatically update Docker container base images
|
||||
type: tool
|
||||
crossVersionUpdate: false
|
||||
crossVersionUpdate: true
|
||||
limit: 1
|
||||
recommend: 0
|
||||
website: https://github.com/containrrr/watchtower
|
||||
|
Loading…
Reference in New Issue
Block a user