Docker Compose Nextcloud Hangs on boot
I'm having a heck of a time with an initial installation of nextcloud. Running from docker-compose on an Ubuntu VM behind traefik 2.1. DB is mariadb tag is pulling 10.5.13 from linuxserver.io's image + a standard redis image. No matter what I do, my log hangs on container start. Very similar results as @nodeswitch in issue #1455. Log file below: (note the last entry is hours after container start)
yesterday at 9:49:48 PMConfiguring Redis as session handler yesterday at 9:49:48 PMInitializing nextcloud 21.0.9.1 ... yesterday at 9:49:54 PMInitializing finished yesterday at 9:49:54 PMNew nextcloud instance yesterday at 9:49:54 PM[Thu Mar 10 03:49:54.705493 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.52 (Debian) PHP/7.4.28 configured -- resuming normal operations yesterday at 9:49:54 PM[Thu Mar 10 03:49:54.705669 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND' today at 1:25:10 AM138.246.253.24 - - [10/Mar/2022:07:25:10 +0000] "GET /robots.txt HTTP/1.1" 200 483 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36"
My docker-compose recipe:
version: "3.7"
services:
## Traefik v2.1 (Chevrotin)
(omitted for brevity, provide upon request)
## MariaDB - MySQL Database
mariadb:
container_name: mariadb
image: linuxserver/mariadb:latest
restart: always
networks:
t2_proxy:
ipv4_address: 192.168.90.250
security_opt:
- no-new-privileges:true
ports:
- "3306:3306"
volumes:
- $USERDIR/docker/mariadb/data:/config
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- PUID=$PUID
- PGID=$PGID
- MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
# Redis - Key-value Store
redis:
container_name: redis
image: redis:latest
entrypoint: redis-server --appendonly yes --requirepass $REDIS_PASSWORD --maxmemory 512mb --maxmemory-policy allkeys-lru
restart: always
networks:
- t2_proxy
security_opt:
- no-new-privileges:true
ports:
- "$REDIS_PORT:6379"
volumes:
- $USERDIR/docker/redis/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
# Nextcloud Docker Application
nextcloud:
image: nextcloud:21
container_name: nextcloud
hostname: nextcloud.domain.tld
restart: unless-stopped
networks:
- t2_proxy
# ports:
# - 80:80
volumes:
- $USERDIR/docker/nextcloud:/var/www/html
- /mnt/data-stor/nextcloud:/var/www/html/data
- $USERDIR/docker/mariadb/data:/var/lib/mysql
- $USERDIR/docker/nextcloud/custom_apps:/var/www/html/custom_apps
- $USERDIR/docker/nextcloud/config:/var/www/html/config
environment:
- REDIS_HOST=redis
- REDIS_PASSWORD=$REDIS_PASSWORD
- MYSQL_USER=$NEXTCLOUD_SQL_USER
- MYSQL_PASSWORD=$NEXTCLOUD_SQL_PASS
- MYSQL_DATABASE=$NEXTCLOUD_SQL_DATABASE
- MYSQL_HOST=$NEXTCLOUD_SQL_DBHOST
- NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.domain.tld
- NEXTCLOUD_TRUSTED_PROXIES=192.168.90.254
labels:
- "traefik.enable=true"
## HTTP Routers
- "traefik.http.routers.nextcloud.entrypoints=https"
- "traefik.http.routers.nextcloud.rule=Host(`nextcloud.domain.tld`)"
- "traefik.http.routers.nextcloud.tls=true"
## Middlewares
- "traefik.http.routers.nextcloud.middlewares=chain-no-auth@file" # No Authentication, rate limiter, secure headers
## HTTP Services
- "traefik.http.routers.nextcloud.service=nextcloud"
- "traefik.http.services.nextcloud.loadbalancer.server.port=80"
The only other relevant thought I have left is that I'm feeding the nextcloud container a "nextcloud " database user/pass on mariadb with all global priviledges instead of the root db user. Still, I would expect to see some semblance of progress in the logs regarding mariadb if this was the case, so I don't think it's a db connection issue.
I've already re-pulled the nextcloud image, to no avail. Thoughts (comments) and prayers appreciated ...this one has me stumped.