I’m using the default Dockerfile for Apache located here, and when I try to build it using docker-compose, the nextcloud container keeps complaining about not being able to find supervisord.conf (Which is in a folder titled /docker/nextcloud/
, alongside /docker/nextcloud/Dockerfile
)
nextcloud | Error: could not find config file supervisord.conf
nextcloud | For help, use /usr/bin/supervisord -h
And after putting the nextcloud cron into docker-compose.yaml, I get the following:
docker-cron-1 | crond: user:www-data entry:(null)
docker-cron-1 | 100001000010000100001000010000100001000010000100001000010000
docker-cron-1 | 111111111111111111111111
docker-cron-1 | 11111111111111111111111111111111
docker-cron-1 | 111111111111
docker-cron-1 | 1111111
docker-cron-1 | crond: wakeup dt=16
docker-cron-1 | crond: file www-data:
docker-cron-1 | crond: line php -f /var/www/html/cron.php
docker-cron-1 | crond: job: 0 php -f /var/www/html/cron.php
docker-cron-1 | crond: child running /bin/bash
docker-cron-1 | crond: USER www-data pid 7 cmd php -f /var/www/html/cron.php
docker-cron-1 | Could not open input file: /var/www/html/cron.php
My docker-compose looks like this at the moment (excluding a few other services such as Portainer and proxy manager):
version: '3.8'
volumes:
nextcloud:
external: true
name: nextcloud
services:
db:
ports:
- '3306'
container_name: mariadb
restart: always
volumes:
- '/var/lib/mysql/:/var/lib/mysql'
image: 'mariadb:latest'
environment:
MARIADB_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
networks:
nextcloud:
mariadb:
ipv4_address: 172.23.0.2
redis:
ports:
- 6379
container_name: redis
restart: always
volumes:
- '/redis/:/data/'
image: redis
networks:
nextcloud:
nextcloud:
ports:
- "8080:80"
- "7964:7867"
container_name: nextcloud
restart: unless-stopped
volumes:
- nextcloud:/var/www/nextcloud
- ./nextcloud-data:/nextcloud/data
depends_on:
- db
- redis
build: ./nextcloud
environment:
MYSQL_DATABASE: "nextcloud"
MYSQL_USER: "nextcloud"
MYSQL_PASSWORD: ${NEXTCLOUD_MYSQL_PASSWORD}
MYSQL_HOST: ${MYSQL_HOST}
SMTP_NAME: "nextcloud"
SMTP_AUTH_TYPE: "LOGIN"
SMTP_PASSWORD: ${NEXTCLOUD_MAIL_PASSWORD}
MAIL_FROM_ADDRESS: ${NEXTCLOUD_MAIL_FROM_ADDRESS}
MAIL_DOMAIN: ${NEXTCLOUD_MAIL_DOMAIN}
PHP_UPLOAD_LIMIT: 2048M
REDIS_HOST: redis
networks:
nextcloud:
mariadb:
ipv4_address: ${IPV4_ADDRESS_NEXTCLOUD}
cron:
image: nextcloud:apache
restart: always
volumes:
- nextcloud:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
- redis
networks:
nextcloud:
external: true
mariadb:
external: true
ipam:
config:
- subnet: ${MDB_SUBNET}
- gateway: ${MDB_GATEWAY}
The error message seems incredibly simple, yet I cannot seem to understand it’s cause. Everything seems correct, so why isn’t nextcloud capable of finding my supervisord config file?