From 4512245d820b289922c341a53452fca74cc917b7 Mon Sep 17 00:00:00 2001 From: notplants <@notplants> Date: Mon, 26 Jan 2026 16:48:49 -0500 Subject: [PATCH] working on wopi scheduler --- abra.sh | 1 + compose.yml | 29 +++++++++++++++++++++++++++++ scheulder_cron.tmpl | 1 + 3 files changed, 31 insertions(+) create mode 100644 scheulder_cron.tmpl diff --git a/abra.sh b/abra.sh index 7ad3998..62177d1 100755 --- a/abra.sh +++ b/abra.sh @@ -4,6 +4,7 @@ export ABRA_ENTRYPOINT_VERSION=v5 export NGINX_CONF_VERSION=v6 export ONLYOFFICE_CONF_VERSION=v2 export PG_BACKUP_VERSION=v3 +export SCHEDULER_CRON_VERSION=v1 environment() { # this exports all the secrets as environment variables diff --git a/compose.yml b/compose.yml index 751fc3e..cf5bc81 100644 --- a/compose.yml +++ b/compose.yml @@ -131,6 +131,31 @@ services: - postgres_p - email_pass + # this may be unnecesary once the PR is merge to use celery beat + # but this is a cron job workaround for now https://github.com/suitenumerique/drive/issues/484 + scheduler: + image: lasuite/drive-backend:main + user: ${DOCKER_USER:-1000} + networks: + - backend + depends_on: + - db + - redis + environment: + <<: [ *common-env, *postgres-env ] + entrypoint: ["/abra-entrypoint.sh", "/usr/local/bin/entrypoint"] + configs: + - source: scheduler_cron + target: /etc/crontabs/root + command: ["crond", "-f", "-l", "2"] + secrets: + - django_sk + - django_sp + - oidc_rpcs + - minio_rp + - postgres_p + - email_pass + celery: user: ${DOCKER_USER:-1000} image: lasuite/drive-backend:v0.10.1 @@ -362,6 +387,10 @@ configs: pg_backup: name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION} file: pg_backup.sh + scheduler_cron: + name: ${STACK_NAME}_scheduler_cron_${SCHEDULER_CRON_VERSION} + file: scheduler_cron.tmpl + template_driver: golang abra_entrypoint: name: ${STACK_NAME}_entrypoint_${ABRA_ENTRYPOINT_VERSION} file: abra-entrypoint.sh diff --git a/scheulder_cron.tmpl b/scheulder_cron.tmpl new file mode 100644 index 0000000..50bf0d1 --- /dev/null +++ b/scheulder_cron.tmpl @@ -0,0 +1 @@ +*/5 * * * * cd /app && python manage.py trigger_wopi_configuration >> /proc/1/fd/1 2>&1 \ No newline at end of file