More HTTPS fixes
continuous-integration/drone/push Build is failing Details

This commit is contained in:
3wc 2023-09-19 15:45:37 +01:00
parent 6450c80236
commit 83a3d82ea5
3 changed files with 7 additions and 6 deletions

View File

@ -26,3 +26,4 @@ REMOVE_BACKUP_VOLUME_AFTER_UPLOAD=1
# HTTPS storage
#SECRET_HTTPS_PASSWORD_VERSION=v1
#COMPOSE_FILE="$COMPOSE_FILE:compose.https.yml"
#RESTIC_USER=<somebody>

View File

@ -41,9 +41,10 @@ if [ -n "$s3_key_file" ] && [ -f "$s3_key_file" ] && [ -n "$AWS_ACCESS_KEY_ID" ]
fi
if [ -n "$https_password_file" ] && [ -f "$https_password_file" ]; then
RESTIC_PASSWORD="$(cat "${https_password_file}")"
export RESTIC_PASSWORD
restic_repo="rest:$restic_host"
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

View File

@ -3,9 +3,8 @@ version: "3.8"
services:
app:
environment:
- SSH_KEY_FILE=/run/secrets/https_password
- SSH_HOST_KEY
- SSH_HOST_KEY_DISABLE
- HTTPS_PASSWORD_FILE=/run/secrets/https_password
- RESTIC_USER
secrets:
- source: https_password
mode: 0400