Skip to content

Commit

Permalink
[FIX] Steps to run backup
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsondev19 committed Nov 18, 2024
1 parent ae87d92 commit ec6b5f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ENV ACCESS_KEY=""
ENV SECRET_KEY=""
ENV MINIO_BUCKET=""
ENV DATABASE_URL=""
ENV CRON_SCHEDULE="0 5 * * *"
ENV CRON_SCHEDULE=""

RUN apk add --no-cache postgresql-client minio-client

Expand All @@ -20,10 +20,4 @@ RUN chmod +x entrypoint.sh

RUN chmod +x run.sh

RUN mkdir /etc/cron

RUN echo "${CRON_SCHEDULE} /bin/sh /app/run.sh" > /etc/cron/crontab

RUN crontab /etc/cron/crontab

ENTRYPOINT ["/app/entrypoint.sh"]
7 changes: 7 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh

mkdir /etc/cron

echo "${CRON_SCHEDULE} /bin/sh /app/run.sh" > /etc/cron/crontab

crontab /etc/cron/crontab

echo "Waiting for cronjob to run your database backup ⏳ -> ${CRON_SCHEDULE}"

crond -f

0 comments on commit ec6b5f3

Please sign in to comment.