From 6efd67ee6eb5d83a47bad20e4ba6982ed501c8c2 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Mon, 9 May 2022 12:26:28 +0100 Subject: [PATCH] Add Loomio cronjob --- compose.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/compose.yml b/compose.yml index 99f32b9..5ff6209 100644 --- a/compose.yml +++ b/compose.yml @@ -107,6 +107,30 @@ services: - redis environment: - REDIS_URL=redis://redis:6379 + cron: + image: loomio/loomio:v2.7.10 + entrypoint: "/usr/local/bundle/bin/bundle" + command: ["exec", "rake", "loomio:hourly_tasks"] + environment: *default-env + volumes: + - loomio_uploads:/loomio/public/system + - loomio_storage:/loomio/storage + - loomio_files:/loomio/public/files + - loomio_plugins:/loomio/plugins/docker + - loomio_import:/import + networks: + - backend + depends_on: + - db + - redis + deploy: + mode: replicated + replicas: 0 + labels: + - "swarm.cronjob.enable=true" + - "swarm.cronjob.schedule=0 * * * *" + restart_policy: + condition: none networks: backend: proxy: