Skip to content

Commit 07c7f48

Browse files
committed
add optional S3_BUCKET
1 parent 32fdbb5 commit 07c7f48

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66

77
To run this project, you will need the following environment variables
88

9+
**Required:**
910
`GH_ORG`
1011

1112
`GH_USER`
1213

1314
`GH_PASS`
1415

16+
**Optional:**
17+
`S3_BUCKET` - If provided, backups will be configured to use S3 storage
18+
1519
## Usage/Examples
1620

1721
```shell
@@ -21,3 +25,13 @@ docker run -v ${LOCAL_BACKUP_DIRECTORY}:/opt/scm-backup/backup \
2125
-e GH_ORG=org \
2226
juroapp/scm-backup
2327
```
28+
29+
**With S3 backup enabled:**
30+
```shell
31+
docker run -v ${LOCAL_BACKUP_DIRECTORY}:/opt/scm-backup/backup \
32+
-e GH_USER=username \
33+
-e GH_PASS=app_password \
34+
-e GH_ORG=org \
35+
-e S3_BUCKET=my-backup-bucket \
36+
juroapp/scm-backup
37+
```

entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ yq e -i '
1212
.name = env(GH_ORG)
1313
| .authName = env(GH_USER)
1414
)
15+
| if has("S3_BUCKET") then
16+
.options.backup.s3BucketName = env(S3_BUCKET)
17+
else
18+
.
19+
end
1520
' settings.yml
1621

1722
exec dotnet ScmBackup.dll

0 commit comments

Comments
 (0)