From 35215648e69231453d965d2aab62ca92ad4dd40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20P=C4=99=C5=9Bko?= Date: Sat, 15 Dec 2018 14:41:04 +0100 Subject: [PATCH] Add cron job to remove tmp and not deleted video files --- dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dockerfile b/dockerfile index 4cb1229..c77e5fa 100644 --- a/dockerfile +++ b/dockerfile @@ -49,5 +49,13 @@ RUN unzip popularity/pretrained_model/svr_test_11.10.sk.zip -d popularity/pretra # Port to expose EXPOSE 8008 +# Remove tmp and not deleted videos periodically +RUN touch mycron && \ + echo "5 0 * * 1 rm /comixify/media/raw_videos/*" >> mycron && \ + echo "5 0 * * 1 rm -r /comixify/tmp/*" >> mycron && \ + echo "" >> mycron && \ + crontab mycron && \ + rm mycron + ENTRYPOINT ["sh", "entrypoint.sh"] CMD ['start']