Using the 10.15 docker image and I can successfully edit the docker-compose.yml to set a custom admin user and password for owncloud server this works and I can access owncloud through a browser.
I tried to do the same sort for the DB elements so that I had stronger passwords and not use the default user name in the example yml file. But when I do this and try and start a brand new container, having remvoed all traces of any previous versions, the containers start up for the DB, Redis and owncloud but the owncloud server container keeps restarting every few seconds.
I see the following error in the log.
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'hgl'@'172.18.0.4' (using password: YES) in /var/www/owncloud/lib/private/DB/Connection.php:62
Here is the yml file I was using with my alterations (I am using a .env file as well)
volumes:
files:
driver: local
mysql:
driver: local
redis:
driver: local
services:
owncloud:
image: owncloud/server:${OWNCLOUD_VERSION} # by default we were 10.15
container_name: owncloud_server
restart: always
ports:
mariadb:
image: mariadb:${MARIADB_VERSION} # minimum required ownCloud version is 10.9, we had 10.11 by default
container_name: owncloud_mariadb
restart: always
environment:
Using the 10.15 docker image and I can successfully edit the docker-compose.yml to set a custom admin user and password for owncloud server this works and I can access owncloud through a browser.
I tried to do the same sort for the DB elements so that I had stronger passwords and not use the default user name in the example yml file. But when I do this and try and start a brand new container, having remvoed all traces of any previous versions, the containers start up for the DB, Redis and owncloud but the owncloud server container keeps restarting every few seconds.
I see the following error in the log.
An unhandled exception has been thrown: Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'hgl'@'172.18.0.4' (using password: YES) in /var/www/owncloud/lib/private/DB/Connection.php:62
Here is the yml file I was using with my alterations (I am using a .env file as well)
volumes: files: driver: local mysql: driver: local redis: driver: local
services: owncloud: image: owncloud/server:${OWNCLOUD_VERSION} # by default we were 10.15 container_name: owncloud_server restart: always ports:
files:/mnt/data
mariadb: image: mariadb:${MARIADB_VERSION} # minimum required ownCloud version is 10.9, we had 10.11 by default container_name: owncloud_mariadb restart: always environment:
mysql:/var/lib/mysql
redis: image: redis:${REDIS_VERSION} # by default version 6 container_name: owncloud_redis restart: always command: ["--databases", "1"] healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 volumes:
And here is my redacted .env file:
OWNCLOUD_VERSION=10.15 OWNCLOUD_DOMAIN=XXXXX OWNCLOUD_TRUSTED_DOMAINS=XXXXX,YYYYY DB_NAME=owncloud DB_USERNAME=xxx DB_PASSWORD=yyyyyyyyyy DB_ROOT_PASSWORD=zzzzzzzzzz ADMIN_USERNAME=tttt ADMIN_PASSWORD=wwwwwwwwww HTTP_PORT=8189 MARIADB_VERSION=10.11 REDIS_VERSION=6