28 Commits

Author SHA1 Message Date
3wc
7f1a02523e chore: publish 0.2.0+1.0.0 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-10 14:15:58 +00:00
3wc
b01ad30ea0 Set manual tag
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-10 14:13:51 +00:00
3wc
5e1032682b Switch to publishing on gitea 2023-11-10 14:12:32 +00:00
3wc
451c511554 Hopefully fix REMOVE_BACKUP_VOLUME_AFTER_UPLOAD
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone Build encountered an error
2023-09-28 10:18:18 +01:00
87d584e4e8 REALLY disable shellcheck
All checks were successful
continuous-integration/drone/push Build is passing
2023-09-26 16:48:29 +02:00
a171d9eea0 disable shellcheck
Some checks failed
continuous-integration/drone/push Build is failing
2023-09-26 16:45:58 +02:00
620ab4e3d7 add to .envrc.sample
Some checks failed
continuous-integration/drone/push Build is failing
2023-09-26 16:43:57 +02:00
3wc
83a3d82ea5 More HTTPS fixes
Some checks failed
continuous-integration/drone/push Build is failing
2023-09-19 15:45:37 +01:00
3wc
6450c80236 Add more HTTPS support
Some checks failed
continuous-integration/drone/push Build is failing
2023-09-19 15:40:20 +01:00
3wc
6f6a82153a Add HTTPS storage support 2023-09-19 15:39:56 +01:00
efc942c041 chore(deps): update docker docker tag to v24.0.6
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-09-06 07:03:13 +00:00
0c4bc19e2a chore(deps): update docker docker tag to v24.0.5
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-07-25 07:07:04 +00:00
dde9987de6 chore(deps): update docker docker tag to v24.0.4
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-07-11 07:02:51 +00:00
5f734bc371 chore(deps): update docker docker tag to v24.0.3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-07-07 07:03:08 +00:00
27e2e61d7f chore(deps): update docker docker tag to v24.0.2
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-05-29 07:03:02 +00:00
1bb1917e18 Merge pull request 'chore(deps): update docker docker tag to v24 (main)' (#14) from renovate/main-docker-24.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #14
2023-05-28 14:23:14 +00:00
7b8b3b1acd chore(deps): update docker docker tag to v24
All checks were successful
continuous-integration/drone/pr Build is passing
2023-05-22 07:06:36 +00:00
9c5ba87232 chore(deps): update docker docker tag to v23.0.6
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-05-10 07:02:21 +00:00
9064bebb56 chore(deps): update docker docker tag to v23.0.5
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-04-27 07:06:03 +00:00
4fdb585825 Merge pull request 'chore(deps): update docker docker tag to v23 (main)' (#11) from renovate/main-docker-23.x into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #11
2023-04-24 08:17:36 +00:00
bde63b3f6f chore(deps): update docker docker tag to v23
All checks were successful
continuous-integration/drone/pr Build is passing
2023-04-18 07:02:30 +00:00
92dfd23b26 feat: backupvolume can be pruned after upload
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-01 13:29:00 +01:00
bab224ab96 chore(deps): update docker docker tag to v19.03.15
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-01-19 08:03:49 +00:00
36928c34ac Merge pull request 'Configure Renovate' (#8) from renovate/configure into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #8
2023-01-18 17:37:22 +00:00
9b324476c2 chore(deps): add renovate.json
All checks were successful
continuous-integration/drone/pr Build is passing
2023-01-18 17:24:09 +00:00
7aa464e271 chore: publish 0.1.0+latest release
All checks were successful
continuous-integration/drone/push Build is passing
2022-10-11 15:28:50 +02:00
59c071734a add labels to get around abra checks 2022-10-11 15:24:35 +02:00
940b6bde1a Merge pull request 'backup multiple paths' (#5) from multi_path into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #5
2021-12-14 14:44:05 +00:00
8 changed files with 74 additions and 13 deletions

View File

@ -10,12 +10,12 @@ steps:
- name: publish image
image: plugins/docker
settings:
auto_tag: true
username: thecoopcloud
username: 3wordchant
password:
from_secret: thecoopcloud_password
repo: thecoopcloud/backup-bot-two
tags: latest
from_secret: git_coopcloud_tech_token_3wc
repo: git.coopcloud.tech/coop-cloud/backup-bot-two
tags: 1.0.0
registry: git.coopcloud.tech
depends_on:
- run shellcheck
when:
@ -25,4 +25,20 @@ steps:
trigger:
branch:
- main
- bb2-classic
---
kind: pipeline
name: generate recipe catalogue
steps:
- name: release a new version
image: plugins/downstream
settings:
server: https://build.coopcloud.tech
token:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
trigger:
event: tag

View File

@ -8,6 +8,7 @@ SERVER_NAME=example.com
RESTIC_HOST=minio.example.com
CRON_SCHEDULE='*/5 * * * *'
REMOVE_BACKUP_VOLUME_AFTER_UPLOAD=1
# swarm-cronjob, instead of built-in cron
#COMPOSE_FILE="$COMPOSE_FILE:compose.swarm-cronjob.yml"
@ -21,3 +22,8 @@ CRON_SCHEDULE='*/5 * * * *'
#SECRET_AWS_SECRET_ACCESS_KEY_VERSION=v1
#AWS_ACCESS_KEY_ID=something-secret
#COMPOSE_FILE="$COMPOSE_FILE:compose.s3.yml"
# HTTPS storage
#SECRET_HTTPS_PASSWORD_VERSION=v1
#COMPOSE_FILE="$COMPOSE_FILE:compose.https.yml"
#RESTIC_USER=<somebody>

View File

@ -10,6 +10,8 @@ export DOCKER_CONTEXT=$SERVER_NAME
# or this:
#export AWS_SECRET_ACCESS_KEY_FILE=s3
#export AWS_ACCESS_KEY_ID=easter-october-emphatic-tug-urgent-customer
# or this:
#export HTTPS_PASSWORD_FILE=/run/secrets/https_password
# optionally limit subset of services for testing
#export SERVICES_OVERRIDE="ghost_domain_tld_app ghost_domain_tld_db"

View File

@ -1,4 +1,4 @@
FROM docker:19.03.13-dind
FROM docker:24.0.6-dind
RUN apk add --upgrade --no-cache \
bash \

View File

@ -11,6 +11,8 @@ backup_path="${BACKUP_DEST:?BACKUP_DEST not set}"
# shellcheck disable=SC2153
ssh_key_file="${SSH_KEY_FILE}"
s3_key_file="${AWS_SECRET_ACCESS_KEY_FILE}"
# shellcheck disable=SC2153
https_password_file="${HTTPS_PASSWORD_FILE}"
restic_repo=
restic_extra_options=
@ -39,8 +41,15 @@ if [ -n "$s3_key_file" ] && [ -f "$s3_key_file" ] && [ -n "$AWS_ACCESS_KEY_ID" ]
restic_repo="s3:$restic_host:/$server_name"
fi
if [ -n "$https_password_file" ] && [ -f "$https_password_file" ]; then
HTTPS_PASSWORD="$(cat "${https_password_file}")"
export HTTPS_PASSWORD
restic_user="${RESTIC_USER:?RESTIC_USER not set}"
restic_repo="rest:https://$restic_user:$HTTPS_PASSWORD@$restic_host"
fi
if [ -z "$restic_repo" ]; then
echo "you must configure either SFTP or S3 storage, see README"
echo "you must configure either SFTP, S3, or HTTPS storage, see README"
exit 1
fi
@ -122,5 +131,9 @@ fi
if [[ \ $*\ != *\ --skip-upload\ * ]]; then
_restic backup --host "$server_name" --tag coop-cloud "$backup_path"
fi
if [ "$REMOVE_BACKUP_VOLUME_AFTER_UPLOAD" -eq 1 ]; then
echo "Cleaning up ${backup_path}"
rm -rf "${backup_path:?}"/*
fi
fi

15
compose.https.yml Normal file
View File

@ -0,0 +1,15 @@
---
version: "3.8"
services:
app:
environment:
- HTTPS_PASSWORD_FILE=/run/secrets/https_password
- RESTIC_USER
secrets:
- source: https_password
mode: 0400
secrets:
https_password:
external: true
name: ${STACK_NAME}_https_password_${SECRET_HTTPS_PASSWORD_VERSION}

View File

@ -2,8 +2,8 @@
version: "3.8"
services:
app:
image: thecoopcloud/backup-bot-two:latest
build: .
image: git.coopcloud.tech:1.0.0
# build: .
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "backups:/backups"
@ -14,11 +14,17 @@ services:
- BACKUP_DEST=/backups
- RESTIC_HOST
- SERVER_NAME
- REMOVE_BACKUP_VOLUME_AFTER_UPLOAD=1
secrets:
- restic_password
deploy:
labels:
- coop-cloud.${STACK_NAME}.app.version=
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8008"
- "traefik.http.routers.${STACK_NAME}.rule="
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- coop-cloud.${STACK_NAME}.version=0.2.0+1.0.0
volumes:
backups:

3
renovate.json Normal file
View File

@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}