Address comments by @samsapti

We need to use ':' instead of '=' in yaml for environment variable
bindings.
Spurious tab where it should be all spaces
Rename variable mail-from to mail_from to align with existing code style
Nit: change email addresses
This commit is contained in:
Reynir Björnsson 2024-03-04 09:20:04 +01:00
parent 6982d0feaa
commit 9fb16d3a69
3 changed files with 4 additions and 4 deletions

View file

@ -53,7 +53,7 @@ services:
# mail dance # mail dance
domain: "noreply.{{ base_domain }}" domain: "noreply.{{ base_domain }}"
allowed_sender_domain: true allowed_sender_domain: true
mail-from: "noreply@noreply.{{ base_domain }}" mail_from: "backup@noreply.{{ base_domain }}"
docker_registry: docker_registry:
domain: "docker.{{ base_domain }}" domain: "docker.{{ base_domain }}"

View file

@ -15,7 +15,7 @@ services:
--tag datacoop-volumes --tag datacoop-volumes
--exclude '*.tmp' --exclude '*.tmp'
--exclude '/mnt/volumes/mastodon/mastodon_data/cache/' --exclude '/mnt/volumes/mastodon/mastodon_data/cache/'
--exclude '/mnt/volumes/restic/' --exclude '/mnt/volumes/restic/'
--verbose --verbose
RESTIC_FORGET_ARGS: >- RESTIC_FORGET_ARGS: >-
--keep-last 10 --keep-last 10
@ -23,7 +23,7 @@ services:
--keep-weekly 5 --keep-weekly 5
--keep-monthly 12 --keep-monthly 12
TZ: Europe/Copenhagen TZ: Europe/Copenhagen
POST_COMMANDS_FAILURE=/run/libexec/failure.sh POST_COMMANDS_FAILURE: /run/libexec/failure.sh
volumes: volumes:
- "./ssh:/run/secrets/.ssh:ro" - "./ssh:/run/secrets/.ssh:ro"
- "./scripts:/run/libexec:ro" - "./scripts:/run/libexec:ro"

View file

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
curl smtp://postfix --mail-from {{ services.restic.mail-from }} --mail-rcpt admin-hold@data.coop --upload-file . << END_OF_MAIL curl smtp://postfix --mail-from {{ services.restic.mail_from }} --mail-rcpt admin@data.coop --upload-file . << END_OF_MAIL
From: Restic backup <{{ services.restic.mail-from }}> From: Restic backup <{{ services.restic.mail-from }}>
To: admin-hold@data.coop To: admin-hold@data.coop
Subject: Restic backup failed Subject: Restic backup failed