Skip to content

Commit

Permalink
Merge pull request #14 from N3aar/fix/watchtower-compose
Browse files Browse the repository at this point in the history
Fix/watchtower compose
  • Loading branch information
Psykka authored Jun 1, 2024
2 parents e020f27 + 0390cf2 commit c7287bb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ TOKEN=your_token_here
NODE_ENV=dev

# database
DATABASE_URL=file:./db.sqlite
DATABASE_URL=file:./db.sqlite

# deploy discord webhook token
DEPLOY_WEBHOOK_TOKEN=your_token_here

# deploy discord webhook id
DEPLOY_WEBHOOK_ID=your_id_here
27 changes: 26 additions & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,38 @@ services:
required: false
volumes:
- eery-data:/data
labels:
- "com.centurylinklabs.watchtower.enable=true"

watchtower:
image: containrrr/watchtower
restart: always
container_name: eery-watchtower
environment:
WATCHTOWER_NOTIFICATIONS: discord://${DEPLOY_WEBHOOK_TOKEN}@${DEPLOY_WEBHOOK_ID}
WATCHTOWER_NOTIFICATION_TEMPLATE: |
{{- if .Report -}}
{{- with .Report -}}
{{len .Scanned}} Scanned, {{len .Updated}} Updated, {{len .Failed}} Failed
{{- range .Updated}}
- {{.Name}} ({{.ImageName}}): {{.CurrentImageID.ShortID}} updated to {{.LatestImageID.ShortID}}
{{- end -}}
{{- range .Fresh}}
- {{.Name}} ({{.ImageName}}): {{.State}}
{{- end -}}
{{- range .Skipped}}
- {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
{{- end -}}
{{- range .Failed}}
- {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
{{- end -}}
{{- end -}}
{{- else -}}
{{range .Entries -}}{{.Message}}{{"\n"}}{{- end -}}
{{- end -}}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 300 --cleanup --label-enable --run-once eery-bot
command: --interval 60 --cleanup --label-enable

volumes:
eery-data:
Expand Down

0 comments on commit c7287bb

Please sign in to comment.