feat(Nextcloud): Split redis & postgres configuration #72

Merged
kosssi merged 1 commits from nextcloud into main 2023-10-05 14:13:47 +02:00
7 changed files with 42 additions and 8 deletions

View File

@ -1,4 +1,5 @@
--- ---
version: "3.8" version: "3.8"
services: services:

View File

@ -1,3 +1,5 @@
---
version: "3.8" version: "3.8"
services: services:

View File

@ -0,0 +1,18 @@
---
version: "3.8"
services:
nextcloud-fpm:
depends_on:
- postgres
environment:
&postgres-configuration
POSTGRES_HOST: ${POSTGRES_CONTAINER_NAME:-postgres} # Default name is same as ../postgres/docker-compose.yml:8
POSTGRES_USER: ${POSTGRES_USER:?err}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?err}
POSTGRES_DB: ${POSTGRES_DB:?err}
nextcloud-cron:
environment:
<<: *postgres-configuration

View File

@ -0,0 +1,15 @@
---
version: "3.8"
services:
nextcloud-fpm:
depends_on:
- redis
environment:
&redis-configuration
REDIS_HOST: ${REDIS_CONTAINER_NAME:-redis} # Default name is same as ../redis/docker-compose.yml:4
nextcloud-cron:
environment:
<<: *redis-configuration

View File

@ -1,3 +1,5 @@
---
version: "3.8" version: "3.8"
services: services:

View File

@ -1,3 +1,5 @@
---
version: "3.8" version: "3.8"
networks: networks:

View File

@ -1,3 +1,5 @@
---
version: "3.8" version: "3.8"
volumes: volumes:
@ -9,9 +11,6 @@ services:
container_name: ${NEXTCLOUD_CONTAINER_NAME:-nextcloud}-fpm container_name: ${NEXTCLOUD_CONTAINER_NAME:-nextcloud}-fpm
image: ${NEXTCLOUD_IMAGE:-nextcloud:25.0.2-fpm-alpine} image: ${NEXTCLOUD_IMAGE:-nextcloud:25.0.2-fpm-alpine}
restart: always restart: always
depends_on:
- postgres
- redis
volumes: volumes:
- nextcloud:/var/www/html - nextcloud:/var/www/html
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
@ -23,11 +22,6 @@ services:
NEXTCLOUD_ADMIN_PASSWORD: ${NEXTCLOUD_ADMIN_PASSWORD?err} NEXTCLOUD_ADMIN_PASSWORD: ${NEXTCLOUD_ADMIN_PASSWORD?err}
OVERWRITEPROTOCOL: ${OVERWRITEPROTOCOL:-https} OVERWRITEPROTOCOL: ${OVERWRITEPROTOCOL:-https}
PHP_UPLOAD_LIMIT: ${PHP_UPLOAD_LIMIT:-512M} PHP_UPLOAD_LIMIT: ${PHP_UPLOAD_LIMIT:-512M}
POSTGRES_HOST: ${POSTGRES_CONTAINER_NAME:-postgres} # Default name is same as ../postgres/docker-compose.yml:8
POSTGRES_USER: ${POSTGRES_USER:?err}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?err}
POSTGRES_DB: ${POSTGRES_DB:?err}
REDIS_HOST: ${REDIS_CONTAINER_NAME:-redis} # Default name is same as ../redis/docker-compose.yml:4
PUID: ${NEXTCLOUD_PUID:-1000} PUID: ${NEXTCLOUD_PUID:-1000}
PGID: ${NEXTCLOUD_PGID:-1000} PGID: ${NEXTCLOUD_PGID:-1000}