1
0
mirror of https://github.com/offen/docker-volume-backup.git synced 2025-11-29 05:46:50 +02:00

Allow backup to be run as non-root user

This commit is contained in:
Frederik Ring
2024-02-21 17:44:24 +01:00
parent 060a6daa7a
commit e8307a2b5b
11 changed files with 131 additions and 6 deletions

View File

@@ -371,3 +371,24 @@ volumes:
data_1:
data_2:
```
## Running as a non-root user
```yml
version: '3'
services:
# ... define other services using the `data` volume here
backup:
image: offen/docker-volume-backup:v2
user: 1000:1000
environment:
AWS_S3_BUCKET_NAME: backup-bucket
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
volumes:
- data:/backup/my-app-backup:ro
volumes:
data:
```