watchtower + diun 컨테이너 업데이트 관리
컨테이너 관리툴인 watchtower , diun 입니다.
watchtower 자동업데이트 적용하고
diun로 업데이트 안내 전달 받아 업데이트 적용할지 고민합니다. ㅜ,.ㅜ
watchtower
docker-compose.yml 내용입니다.
version: "3"
services:
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
TZ: Asia/Seoul
#WATCHTOWER_CLEANUP: 'true'
WATCHTOWER_POLL_INTERVAL: 432000 #업데이트 주기 초로 계산 후 적용
restart: unless-stopped
설치 후 자동 업데이트 제외할 컨테이너는 lavel을 적용하시면 됩니다.
com.centurylinklabs.watchtower.enable | false |
diun
version: "3.5"
services:
diun:
image: crazymax/diun:latest
container_name: diun
command: serve
volumes:
- "./data:/data"
- "./diun.yml:/diun.yml:ro" #diun.yml 파일 만들어 사용
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- "TZ=Asia/Seoul"
- "LOG_LEVEL=info"
- "LOG_JSON=false"
labels:
- "diun.enable=true"
restart: always
diun.yml 설정 파일 생성
watch:
workers: 20
schedule: "0 */6 * * *"
providers:
docker:
watchStopped: true
notif: #알림 설정
telegram:
token: 5117886267:AAGEkxxxxxxxxxxxxxx. #bot토큰
chatIDs:
- 99999999 #텔레그램 챗아이디
templateBody: |
Docker tag {{ .Entry.Image }} which you subscribed to through {{ .Entry.Provider }} provider has been released.
생성 후
적용 컨테이너에 라벨 적용
diun.enable | true |
watchtower는 간단하지만
diun 다른 알림 설정 확인하시려면
https://crazymax.dev/diun/
참고바랍니다.
초보라 설명이 짧은점 죄송합니다.
좋은 정보 감사합니다
watchtower 환경설정으로 smtp email 발송이 가능해서 시놀로지 도커에서는 email noti 잘 써먹고 있는데
아마존 인스턴스에 설치한 watchtower에서 지메일 발송하면
알수없는 위치에서 지메일 로그인 시도했다고 차단되어 버리네요. ;;;
오라클 인스턴스는 같은 지메일로 email 발송이 차단되서
알려주신 duin으로 텔글그램 활용해야 할지 공부봥봐야겠습니다.
오호.. diun 이 알람을 해주는군요
왓치타워와 셋트로하면 딱 좋을듯합니다!! 좋은정보감사합니다 ㅎㅎ
watchtower 설치되어 있는 상태로 diun 설치했는데 아래와 같은 메세지가 오네요.
"Docker tag docker.io/jc21/nginx-proxy-manager:latest which you subscribed to through docker provider has been released."
"Docker tag docker.io/portainer/portainer-ce:latest which you subscribed to through docker provider has been released"
이미 최신 버전이라서 위와 같은 메세지가 뜨는걸까요? 의미를 잘 모르겠습니다.
나중에 watchtower에서 버전 업데이트 해주면 다른 메세지가 찍히는걸지... 어떤 결과가 나오는지 궁금합니다.
아시는분 계시면 공유 부탁 드립니다.
cmt alert