From e0c0163aae6cae7bcf16b9fef9352ccf0bfad43e Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Tue, 22 Nov 2022 17:40:55 +0100 Subject: [PATCH] Add cron container to Nextcloud --- roles/docker/tasks/services/nextcloud.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/roles/docker/tasks/services/nextcloud.yml b/roles/docker/tasks/services/nextcloud.yml index b9f2bedb..995b7785 100644 --- a/roles/docker/tasks/services/nextcloud.yml +++ b/roles/docker/tasks/services/nextcloud.yml @@ -31,6 +31,18 @@ - /var/lib/redis networks: - "nextcloud" + + cron: + image: "nextcloud:25-apache" + restart: "unless-stopped" + entrypoint: "/cron.sh" + networks: + - "nextcloud" + volumes: + - "{{ nextcloud.volume_folder }}/app:/var/www/html" + depends_on: + - "postgres" + - "redis" app: image: "nextcloud:25-apache" @@ -39,7 +51,7 @@ - "nextcloud" - "external_services" volumes: - - "{{ nextcloud.volume_folder }}/app:/var/www/html" + - "{{ nextcloud.volume_folder }}/app:/var/www/html" environment: VIRTUAL_HOST: "{{ nextcloud.domain }}" LETSENCRYPT_HOST: "{{ nextcloud.domain }}" @@ -50,6 +62,9 @@ POSTGRES_PASSWORD: "{{ postgres_passwords.nextcloud }}" REDIS_HOST: "redis" REDIS_HOST_PASSWORD: "{{ nextcloud_secrets.redis_password }}" + depends_on: + - "postgres" + - "redis" networks: nextcloud: