From c03f72191b0ce6978f067d8678ad4a0ed1c15773 Mon Sep 17 00:00:00 2001 From: mindesbunister Date: Tue, 11 Nov 2025 14:29:00 +0100 Subject: [PATCH] Fix Nextcloud network issues by removing fixed container names - Removed container_name directives to prevent stale endpoint conflicts - Added network aliases (db, redis, app) for service discovery - Added depends_on to ensure proper startup order - Added external: false to network config for better lifecycle management - This prevents recurring network endpoint issues after docker system prune --- compose_files/nextcloud.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/compose_files/nextcloud.yml b/compose_files/nextcloud.yml index e1c66fe..14ff016 100755 --- a/compose_files/nextcloud.yml +++ b/compose_files/nextcloud.yml @@ -1,12 +1,20 @@ version: '3' services: + redis: + image: redis:alpine + restart: unless-stopped + volumes: + - redis_data:/data + networks: + nextcloud: + aliases: + - redis db: #logging: #driver: loki #options: #loki-url: "http://localhost:3100/loki/api/v1/push" image: mariadb:10.5 - container_name: mariadb-nextcloud volumes: - /home/icke/mariadb-nextcloud/db:/var/lib/mysql - /etc/localtime:/etc/localtime:ro @@ -16,13 +24,19 @@ services: - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud restart: unless-stopped + networks: + nextcloud: + aliases: + - db app: #logging: #driver: loki #options: #loki-url: "http://localhost:3100/loki/api/v1/push" - image: nextcloud_full:1 - container_name: nextcloud + image: nextcloud_full:30 + depends_on: + - db + - redis ports: - 8089:80 volumes: @@ -39,6 +53,10 @@ services: - UPLOAD_MAX_SIZE=20G #- LOG_LEVEL=DEBUG restart: unless-stopped + networks: + nextcloud: + aliases: + - app #collabora: #logging: # driver: loki @@ -57,4 +75,10 @@ services: volumes: nextcloud: db: + redis_data: #collabora: + +networks: + nextcloud: + driver: bridge + external: false