mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-22 21:30:28 +01:00
Tag releases with major version too (#82)
This commit is contained in:
parent
da8c63f755
commit
1ea0b51b23
@ -48,6 +48,7 @@ jobs:
|
|||||||
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
# prerelease tags like `v2.0.0-alpha.1` should not be released as `latest`
|
# prerelease tags like `v2.0.0-alpha.1` should not be released as `latest`
|
||||||
tag_args="$tag_args -t offen/docker-volume-backup:latest"
|
tag_args="$tag_args -t offen/docker-volume-backup:latest"
|
||||||
|
tag_args="$tag_args -t offen/docker-volume-backup:$(echo "$CIRCLE_TAG" | cut -d. -f1)"
|
||||||
fi
|
fi
|
||||||
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 \
|
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 \
|
||||||
$tag_args . --push
|
$tag_args . --push
|
||||||
|
38
README.md
38
README.md
@ -107,7 +107,7 @@ docker run --rm \
|
|||||||
--env AWS_SECRET_ACCESS_KEY="<xxx>" \
|
--env AWS_SECRET_ACCESS_KEY="<xxx>" \
|
||||||
--env AWS_S3_BUCKET_NAME="<xxx>" \
|
--env AWS_S3_BUCKET_NAME="<xxx>" \
|
||||||
--entrypoint backup \
|
--entrypoint backup \
|
||||||
offen/docker-volume-backup:latest
|
offen/docker-volume-backup:v2
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, pass a `--env-file` in order to use a full config as described below.
|
Alternatively, pass a `--env-file` in order to use a full config as described below.
|
||||||
@ -401,7 +401,7 @@ services:
|
|||||||
- docker-volume-backup.stop-during-backup=service1
|
- docker-volume-backup.stop-during-backup=service1
|
||||||
|
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
BACKUP_STOP_CONTAINER_LABEL: service1
|
BACKUP_STOP_CONTAINER_LABEL: service1
|
||||||
volumes:
|
volumes:
|
||||||
@ -424,7 +424,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data` volume here
|
# ... define other services using the `data` volume here
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
BACKUP_FILENAME: backup-%Y-%m-%dT%H-%M-%S.tar.gz
|
BACKUP_FILENAME: backup-%Y-%m-%dT%H-%M-%S.tar.gz
|
||||||
BACKUP_PRUNING_PREFIX: backup-
|
BACKUP_PRUNING_PREFIX: backup-
|
||||||
@ -447,7 +447,7 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
# ... other configuration values go here
|
# ... other configuration values go here
|
||||||
NOTIFICATION_URLS=smtp://me:secret@smtp.example.com:587/?fromAddress=no-reply@example.com&toAddresses=you@example.com
|
NOTIFICATION_URLS=smtp://me:secret@smtp.example.com:587/?fromAddress=no-reply@example.com&toAddresses=you@example.com
|
||||||
@ -525,7 +525,7 @@ services:
|
|||||||
- docker-volume-backup.exec-label=database
|
- docker-volume-backup.exec-label=database
|
||||||
|
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
EXEC_LABEL: database
|
EXEC_LABEL: database
|
||||||
volumes:
|
volumes:
|
||||||
@ -602,7 +602,7 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
volumes:
|
volumes:
|
||||||
- data:/backup/my-app-backup:ro
|
- data:/backup/my-app-backup:ro
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
@ -625,7 +625,7 @@ When running in Swarm mode, it's also advised to set a hard memory limit on your
|
|||||||
```yml
|
```yml
|
||||||
services:
|
services:
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
deployment:
|
deployment:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
@ -679,7 +679,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data` volume here
|
# ... define other services using the `data` volume here
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
volumes:
|
volumes:
|
||||||
- data:/backup/my-app-backup:ro
|
- data:/backup/my-app-backup:ro
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
@ -708,7 +708,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data` volume here
|
# ... define other services using the `data` volume here
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
AWS_BUCKET_NAME: backup-bucket
|
AWS_BUCKET_NAME: backup-bucket
|
||||||
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
|
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
|
||||||
@ -729,7 +729,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data` volume here
|
# ... define other services using the `data` volume here
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
AWS_ENDPOINT: s3.filebase.com
|
AWS_ENDPOINT: s3.filebase.com
|
||||||
AWS_BUCKET_NAME: filebase-bucket
|
AWS_BUCKET_NAME: filebase-bucket
|
||||||
@ -751,7 +751,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data` volume here
|
# ... define other services using the `data` volume here
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
AWS_ENDPOINT: minio.example.com
|
AWS_ENDPOINT: minio.example.com
|
||||||
AWS_BUCKET_NAME: backup-bucket
|
AWS_BUCKET_NAME: backup-bucket
|
||||||
@ -773,7 +773,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data` volume here
|
# ... define other services using the `data` volume here
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
WEBDAV_URL: https://webdav.mydomain.me
|
WEBDAV_URL: https://webdav.mydomain.me
|
||||||
WEBDAV_PATH: /my/directory/
|
WEBDAV_PATH: /my/directory/
|
||||||
@ -795,7 +795,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data` volume here
|
# ... define other services using the `data` volume here
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
BACKUP_FILENAME: backup-%Y-%m-%dT%H-%M-%S.tar.gz
|
BACKUP_FILENAME: backup-%Y-%m-%dT%H-%M-%S.tar.gz
|
||||||
BACKUP_LATEST_SYMLINK: backup-latest.tar.gz
|
BACKUP_LATEST_SYMLINK: backup-latest.tar.gz
|
||||||
@ -816,7 +816,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data` volume here
|
# ... define other services using the `data` volume here
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
AWS_BUCKET_NAME: backup-bucket
|
AWS_BUCKET_NAME: backup-bucket
|
||||||
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
|
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
|
||||||
@ -838,7 +838,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data` volume here
|
# ... define other services using the `data` volume here
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
# take a backup on every hour
|
# take a backup on every hour
|
||||||
BACKUP_CRON_EXPRESSION: "0 * * * *"
|
BACKUP_CRON_EXPRESSION: "0 * * * *"
|
||||||
@ -861,7 +861,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data` volume here
|
# ... define other services using the `data` volume here
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
AWS_BUCKET_NAME: backup-bucket
|
AWS_BUCKET_NAME: backup-bucket
|
||||||
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
|
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
|
||||||
@ -885,7 +885,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data` volume here
|
# ... define other services using the `data` volume here
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
AWS_BUCKET_NAME: backup-bucket
|
AWS_BUCKET_NAME: backup-bucket
|
||||||
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
|
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
|
||||||
@ -912,7 +912,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- app_data:/tmp/dumps
|
- app_data:/tmp/dumps
|
||||||
backup:
|
backup:
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment:
|
environment:
|
||||||
BACKUP_FILENAME: db.tar.gz
|
BACKUP_FILENAME: db.tar.gz
|
||||||
BACKUP_CRON_EXPRESSION: "0 2 * * *"
|
BACKUP_CRON_EXPRESSION: "0 2 * * *"
|
||||||
@ -933,7 +933,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
# ... define other services using the `data_1` and `data_2` volumes here
|
# ... define other services using the `data_1` and `data_2` volumes here
|
||||||
backup_1: &backup_service
|
backup_1: &backup_service
|
||||||
image: offen/docker-volume-backup:latest
|
image: offen/docker-volume-backup:v2
|
||||||
environment: &backup_environment
|
environment: &backup_environment
|
||||||
BACKUP_CRON_EXPRESSION: "0 2 * * *"
|
BACKUP_CRON_EXPRESSION: "0 2 * * *"
|
||||||
AWS_BUCKET_NAME: backup-bucket
|
AWS_BUCKET_NAME: backup-bucket
|
||||||
|
Loading…
Reference in New Issue
Block a user