Commit 51b847ca authored by Ryan Herbert's avatar Ryan Herbert

docker add backup container

A container that starts a cron job to use the backup.sh script
parent ffffd3ed
......@@ -38,6 +38,7 @@ services:
- /opt/vidjil/upload/uploads:/mnt/upload/uploads
- /opt/vidjil/log:/var/vidjil
- /opt/vidjil/log/nginx:/var/log/nginx
- /opt/vidjil/backup:/mnt/backup
nginx:
image: vidjil:test
depends_on:
......@@ -62,6 +63,13 @@ services:
- mysql
links:
- mysql
backup:
image: vidjil:test
command: bash -c "echo '0 5 * * * cd /usr/share/vidjil/server; sh backup.sh /mnt/backup 2>1&' > /etc/cron.d/backup-cron && cron"
volumes_from:
- uwsgi
links:
- mysql
reporter:
build: ./reporter
image: reporter:test
......
......@@ -6,7 +6,7 @@ with a full installation of the Vidjil algoright and browser/server."
env GOSU_VERSION 1.7
run set -x \
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \
&& apt-get update && apt-get install -y --no-install-recommends ca-certificates wget cron && rm -rf /var/lib/apt/lists/* \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment