File tree Expand file tree Collapse file tree 6 files changed +24
-13
lines changed
Expand file tree Collapse file tree 6 files changed +24
-13
lines changed Original file line number Diff line number Diff line change 11FROM rclone/rclone:1.69.1 as rclone
22
3- FROM ubuntu:18.04
3+ FROM ubuntu:noble-20250127
44
55ARG UNAME=hedera
66ARG UID=2000
@@ -16,12 +16,23 @@ RUN apt-get update && \
1616 ca-certificates \
1717 jq
1818
19+ # Create Application Folders
20+ RUN mkdir -p "/app"
21+
1922COPY cron /etc/cron.d/backup
20- ADD backup.sh /
21- ADD entrypoint.sh /
22- RUN chmod ugo+x /backup.sh /entrypoint.sh
23+ ADD backup.sh /app/
24+ ADD entrypoint.sh /app/
25+ RUN chmod ugo+x /app/ backup.sh /app /entrypoint.sh
2326
2427COPY rclone.conf /root/.config/rclone/rclone.conf
2528COPY rclone.conf /home/hedera/.config/rclone/rclone.conf
2629
27- ENTRYPOINT ["bash" , "-c" , "./entrypoint.sh" ]
30+ ENTRYPOINT ["bash" , "-c" , "./app/entrypoint.sh" ]
31+
32+ # Define Application Environment Variables
33+ ENV RCLONE_CONFIG_BACKUPS_TYPE="s3"
34+ ENV RCLONE_CONFIG_BACKUPS_PROVIDER="GCS"
35+ ENV RCLONE_CONFIG_BACKUPS_REGION="us-central1"
36+ ENV RCLONE_CONFIG_BACKUPS_ENDPOINT="https://storage.googleapis.com"
37+ ENV AWS_ACCESS_KEY_ID=""
38+ ENV AWS_SECRET_ACCESS_KEY=""
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ val appVersion = project.version.toString()
2626docker {
2727 name = " ${repo} /${registry} /${containerName} :${appVersion} "
2828 version = appVersion
29- files(" entrypoint.sh" )
29+ files(" /app/ entrypoint.sh" )
3030 buildx(true )
3131 if (! System .getenv(" CI" ).isNullOrEmpty()) {
3232 platform(" linux/arm64" , " linux/amd64" )
Original file line number Diff line number Diff line change 11# backup
2- */10 * * * * root /backup.sh
2+ */10 * * * * root /app/ backup.sh
33# backup
Original file line number Diff line number Diff line change 88 #
99 # 1. all environment variables are passed in
1010 # 2. ensure multiple copies can't be running (as there is no copy)
11- ( . . /backup.sh)
11+ ( . /app /backup.sh)
1212 sleep 300
1313done
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11[backups]
2- type = google cloud storage
3- location = us-west2
4- bucket_policy_only = true
5- service_account_file = /sa.json
2+ type = ${RCLONE_CONFIG_BACKUPS_TYPE}
3+ provider = ${RCLONE_CONFIG_BACKUPS_PROVIDER}
4+ env_auth = true
5+ region = ${RCLONE_CONFIG_BACKUPS_REGION}
6+ endpoint = ${RCLONE_CONFIG_BACKUPS_ENDPOINT}
You can’t perform that action at this time.
0 commit comments