Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/watchtower compose #14

Merged
merged 2 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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