14 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
7 changed files with 58 additions and 11 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

@ -22,3 +22,8 @@ REMOVE_BACKUP_VOLUME_AFTER_UPLOAD=1
#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:24.0.2-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
@ -125,6 +134,6 @@ if [[ \ $*\ != *\ --skip-upload\ * ]]; then
if [ "$REMOVE_BACKUP_VOLUME_AFTER_UPLOAD" -eq 1 ]; then
echo "Cleaning up ${backup_path}"
rm -rf "${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,7 +2,7 @@
version: "3.8"
services:
app:
image: thecoopcloud/backup-bot-two:latest
image: git.coopcloud.tech:1.0.0
# build: .
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
@ -24,7 +24,7 @@ services:
- "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.1.0+latest
- coop-cloud.${STACK_NAME}.version=0.2.0+1.0.0
volumes:
backups: