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
This commit is contained in:
@@ -1,12 +1,20 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
|
redis:
|
||||||
|
image: redis:alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- redis_data:/data
|
||||||
|
networks:
|
||||||
|
nextcloud:
|
||||||
|
aliases:
|
||||||
|
- redis
|
||||||
db:
|
db:
|
||||||
#logging:
|
#logging:
|
||||||
#driver: loki
|
#driver: loki
|
||||||
#options:
|
#options:
|
||||||
#loki-url: "http://localhost:3100/loki/api/v1/push"
|
#loki-url: "http://localhost:3100/loki/api/v1/push"
|
||||||
image: mariadb:10.5
|
image: mariadb:10.5
|
||||||
container_name: mariadb-nextcloud
|
|
||||||
volumes:
|
volumes:
|
||||||
- /home/icke/mariadb-nextcloud/db:/var/lib/mysql
|
- /home/icke/mariadb-nextcloud/db:/var/lib/mysql
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
@@ -16,13 +24,19 @@ services:
|
|||||||
- MYSQL_DATABASE=nextcloud
|
- MYSQL_DATABASE=nextcloud
|
||||||
- MYSQL_USER=nextcloud
|
- MYSQL_USER=nextcloud
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
nextcloud:
|
||||||
|
aliases:
|
||||||
|
- db
|
||||||
app:
|
app:
|
||||||
#logging:
|
#logging:
|
||||||
#driver: loki
|
#driver: loki
|
||||||
#options:
|
#options:
|
||||||
#loki-url: "http://localhost:3100/loki/api/v1/push"
|
#loki-url: "http://localhost:3100/loki/api/v1/push"
|
||||||
image: nextcloud_full:1
|
image: nextcloud_full:30
|
||||||
container_name: nextcloud
|
depends_on:
|
||||||
|
- db
|
||||||
|
- redis
|
||||||
ports:
|
ports:
|
||||||
- 8089:80
|
- 8089:80
|
||||||
volumes:
|
volumes:
|
||||||
@@ -39,6 +53,10 @@ services:
|
|||||||
- UPLOAD_MAX_SIZE=20G
|
- UPLOAD_MAX_SIZE=20G
|
||||||
#- LOG_LEVEL=DEBUG
|
#- LOG_LEVEL=DEBUG
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
nextcloud:
|
||||||
|
aliases:
|
||||||
|
- app
|
||||||
#collabora:
|
#collabora:
|
||||||
#logging:
|
#logging:
|
||||||
# driver: loki
|
# driver: loki
|
||||||
@@ -57,4 +75,10 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
nextcloud:
|
nextcloud:
|
||||||
db:
|
db:
|
||||||
|
redis_data:
|
||||||
#collabora:
|
#collabora:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
nextcloud:
|
||||||
|
driver: bridge
|
||||||
|
external: false
|
||||||
|
|||||||
Reference in New Issue
Block a user