-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b280908
commit 929c50b
Showing
1 changed file
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
FROM python:3.10 | ||
WORKDIR /backup | ||
|
||
ENV ACCESS_TOKEN="" | ||
ENV ORGANIZATION="" | ||
|
||
RUN apt-get update && apt-get upgrade -y && \ | ||
apt-get install -y git | ||
|
||
RUN mkdir "/backup/backup" | ||
RUN mkdir "/backup/metrics" | ||
|
||
RUN pip install backup-github-org==1.0.4 | ||
ENTRYPOINT ["/usr/local/bin/backup-github", "--all", "-t", "$ACCESS_TOKEN", "-o", "./backup/", | ||
"--metrics_path", "./metrics/${ORGANIZATION}_github_backup.prom", "$ORGANIZATION", ">", "./logs_${ORGANIZATION}.log"] | ||
|
||
ENTRYPOINT backup-github --all -t $ACCESS_TOKEN -o /backup/backup --metrics_path /backup/metrics/${ORGANIZATION}_github_backup.prom $ORGANIZATION |