- Diun monitors Docker images - Automated updates for nginx, manual approval for gitea/postgres - Weekly cert renewal automation via cron - Health checks with automatic rollback on failure - AWS SES email notifications on update failures - Daily S3 backups + pre-update snapshots - Integration tests with Gitea Actions quality gate - Change domain from gitea.poll-streams.com to git.poll-streams.com - Add diagrams
27 lines
831 B
Bash
Executable File
27 lines
831 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
BUCKET_NAME="${1:-qvest-task-backups}"
|
|
|
|
echo "Emptying S3 bucket: $BUCKET_NAME"
|
|
|
|
# Delete all object versions
|
|
aws s3api list-object-versions --bucket "$BUCKET_NAME" --output text \
|
|
--query 'Versions[].[Key,VersionId]' 2>/dev/null | \
|
|
while read -r key version; do
|
|
if [ -n "$key" ]; then
|
|
aws s3api delete-object --bucket "$BUCKET_NAME" --key "$key" --version-id "$version" >/dev/null 2>&1
|
|
fi
|
|
done || true
|
|
|
|
# Delete all delete markers
|
|
aws s3api list-object-versions --bucket "$BUCKET_NAME" --output text \
|
|
--query 'DeleteMarkers[].[Key,VersionId]' 2>/dev/null | \
|
|
while read -r key version; do
|
|
if [ -n "$key" ]; then
|
|
aws s3api delete-object --bucket "$BUCKET_NAME" --key "$key" --version-id "$version" >/dev/null 2>&1
|
|
fi
|
|
done || true
|
|
|
|
echo "S3 bucket emptied successfully"
|