Skip to content

Commit

Permalink
Importozameshchenie: support for custom webhooks instead of single he…
Browse files Browse the repository at this point in the history
…althchecks.io
  • Loading branch information
f213 committed Jan 23, 2023
1 parent bc52bca commit 902abe7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13
FROM alpine:3.16.3
LABEL maintainer="Fedor Borshev <[email protected]>"

RUN apk update \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Backup PostgresSQL to S3 (supports periodic backups)

This is a fork of [karser/postgres-backup-s3](https://github.com/karser/docker-images) with http://healthchecks.io support
This is a fork of [karser/postgres-backup-s3](https://github.com/karser/docker-images) with webhook support

## Usage

Expand Down Expand Up @@ -39,7 +39,7 @@ postgres-backup:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_EXTRA_OPTS: '--schema=public --blobs'
HEALTHCHECKS_IO_CHECK_ID: 73968bba-011a-476b-b206-7b113af22e0c
SUCCESS_WEBHOOK: https://sb-ping.ru/8pp9RGwDDPzTL2R8MRb8Ae
```
### Automatic Periodic Backups
Expand Down
8 changes: 4 additions & 4 deletions backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ echo "DB backup uploaded successfully"

rm db.dump

if [ -n $HEALTHCHECKS_IO_CHECK_ID ]; then
echo "Notifying healthchecks.io"
curl -m 10 --retry 5 https://hc-ping.com/$HEALTHCHECKS_IO_CHECK_ID
fi
if [ -n $SUCCESS_WEBHOOK ]; then
echo "Notifying $SUCCESS_WEBHOOK"
curl -m 10 --retry 5 $SUCCESS_WEBHOOK
fi

0 comments on commit 902abe7

Please sign in to comment.