From a4dedb8369adb040259bbeae3b46e12aaa0957e1 Mon Sep 17 00:00:00 2001 From: Franck Kerbiriou Date: Thu, 22 Aug 2024 22:30:45 +0200 Subject: [PATCH] Add Nextcloud with Postgres --- .../compose/nextcloud-with-postgres.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 templates/compose/nextcloud-with-postgres.yaml diff --git a/templates/compose/nextcloud-with-postgres.yaml b/templates/compose/nextcloud-with-postgres.yaml new file mode 100644 index 000000000..15a2c97b6 --- /dev/null +++ b/templates/compose/nextcloud-with-postgres.yaml @@ -0,0 +1,52 @@ +# documentation: https://docs.nextcloud.com +# slogan: NextCloud is a self-hosted, open-source platform that provides file storage, collaboration, and communication tools for seamless data management. +# tags: cloud, collaboration, communication, filestorage, data +# logo: svgs/nextcloud.svg + +services: + nextcloud: + image: lscr.io/linuxserver/nextcloud:latest + environment: + - SERVICE_FQDN_NEXTCLOUD + - PUID=1000 + - PGID=1000 + - TZ=Europe/Paris + - POSTGRES_DB=${POSTGRES_DB:-nextcloud} + - POSTGRES_USER=$SERVICE_USER_POSTGRES + - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES + - POSTGRES_HOST=postgresql + - REDIS_HOST=redis + - REDIS_PORT=6379 + volumes: + - nextcloud-config:/config + - nextcloud-data:/data + healthcheck: + test: ["CMD", "curl", "-f", "http://127.0.0.1:80"] + interval: 2s + timeout: 10s + retries: 15 + postgresql: + image: postgres:16-alpine + volumes: + - postgresql-data:/var/lib/postgresql/data + environment: + - POSTGRES_USER=$SERVICE_USER_POSTGRES + - POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES + - POSTGRES_DB=${POSTGRES_DB:-nextcloud} + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] + interval: 5s + timeout: 20s + retries: 10 + redis: + image: "redis:7.4-alpine" + volumes: + - "redis-data:/data" + healthcheck: + test: + - CMD + - redis-cli + - PING + interval: 5s + timeout: 10s + retries: 20