From 0afa1296db7e751d1f32dce96310632fdcf08b2b Mon Sep 17 00:00:00 2001 From: Pieter Date: Wed, 14 Dec 2022 16:32:20 +0200 Subject: [PATCH] feat: add cron job for syncing mirror (#537) --- docker-compose.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index e8c3f0bd4..10edbccbc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -150,6 +150,21 @@ services: volumes: - panamax-crates-vol:/mirror/crates - panamax-io-index-vol:/mirror/crates.io-index + labels: + deck-chores.sync-mirror.command: panamax sync /mirror + deck-chores.sync-mirror.interval: 5 minutes + deck-chores.sync-mirror.max: 1 + deploy: + placement: + constraints: + - node.hostname==controller + deck-chores: + image: funkyfuture/deck-chores:1 + restart: unless-stopped + environment: + TIMEZONE: UTC + volumes: + - /var/run/docker.sock:/var/run/docker.sock deploy: placement: constraints: