From 2fed940f12212e6e415db0cde022573b489286bb Mon Sep 17 00:00:00 2001 From: Maciej Krok <> Date: Wed, 8 Apr 2020 17:11:13 +0200 Subject: [PATCH] redis crone master --- nextcloud/nextcloud.yaml | 42 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/nextcloud/nextcloud.yaml b/nextcloud/nextcloud.yaml index 98275e6..7686782 100644 --- a/nextcloud/nextcloud.yaml +++ b/nextcloud/nextcloud.yaml @@ -1,8 +1,8 @@ -version: '3' +version: '3.6' services: db: - image: postgres:latest + image: postgres:11 volumes: - db_data:/var/lib/postgresql/data environment: @@ -17,13 +17,42 @@ services: condition: on-failure delay: 5s + redis: + image: redis:alpine + volumes: + - redis_data:/data + networks: + - internal + deploy: + replicas: 1 + restart_policy: + condition: on-failure + delay: 5s + + cron: + image: nextcloud:stable + volumes: + - nextcloud:/var/www/html + - apps:/var/www/html/custom_apps + - config:/var/www/html/config + - data:/var/www/html/data + entrypoint: /cron.sh + networks: + - internal + deploy: + replicas: 1 + restart_policy: + condition: on-failure + delay: 5s + nextcloud: - image: nextcloud:latest + image: nextcloud:stable environment: - POSTGRES_USER=nextcloud - POSTGRES_PASSWORD=nextcloud - POSTGRES_DB=nextcloud - POSTGRES_HOST=db:5432 + - REDIS_HOST=redis volumes: - nextcloud:/var/www/html - apps:/var/www/html/custom_apps @@ -33,6 +62,12 @@ services: - internal - external - traefik-net + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost/cron.php"] + interval: 1m30s + timeout: 10s + retries: 3 + start_period: 40s deploy: mode: replicated replicas: 1 @@ -54,6 +89,7 @@ services: volumes: db_data: + redis_data: nextcloud: apps: config: