forked from experimental-berlin/muzhack-backup-rethinkdb
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
3 changed files
with
10 additions
and
8 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,16 +1,19 @@ | ||
FROM debian | ||
MAINTAINER "MuzHack" <[email protected]> | ||
|
||
RUN apt-get update && apt-get install -y cron python3 rethinkdb \ | ||
&& pip3 install virtualenv | ||
RUN apt-get update && apt-get install -y cron python3 python3-pip lsb-release wget | ||
RUN echo "deb http://download.rethinkdb.com/apt `lsb_release -cs` main" | tee /etc/apt/sources.list.d/rethinkdb.list | ||
RUN wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | apt-key add - | ||
RUN apt-get update && apt-get install -y rethinkdb | ||
RUN apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
WORKDIR /app | ||
COPY ./crontab /etc/cron.d/ | ||
COPY ./requirements.txt /app | ||
COPY ./requirements.txt /app/ | ||
RUN mkdir -p /app/rethinkdb | ||
COPY ./rethinkdb/backup.py /app/rethinkdb/ | ||
|
||
RUN virtualenv /env && /env/bin/pip3 install -r requirements.txt | ||
RUN pip3 install -r requirements.txt | ||
RUN rm -rf requirements.txt | ||
|
||
CMD /env/bin/python3 cron.py | ||
CMD python3 cron.py |
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
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 +1 @@ | ||
30 18 * * * /env/bin/python3 /app/rethinkdb/backup.py --s3-bucket $S3_BUCKET --remove | ||
30 18 * * * python3 /app/rethinkdb/backup.py --s3-bucket $S3_BUCKET --remove |