You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
dac1976
changed the title
Changing the DB username and password makes continer continuously restart
Changing the DB username and password makes container continuously restart
Nov 22, 2024
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:
- ${HTTP_PORT}:8080
depends_on:
- mariadb
- redis
environment:
- OWNCLOUD_DOMAIN=${OWNCLOUD_DOMAIN}
- OWNCLOUD_TRUSTED_DOMAINS=${OWNCLOUD_TRUSTED_DOMAINS}
- OWNCLOUD_DB_TYPE=mysql
- OWNCLOUD_DB_NAME=${DB_NAME} # Default is owncloud
- OWNCLOUD_DB_USERNAME=${DB_USERNAME}
- OWNCLOUD_DB_PASSWORD=${DB_PASSWORD}
- OWNCLOUD_DB_HOST=mariadb
- OWNCLOUD_ADMIN_USERNAME=${ADMIN_USERNAME}
- OWNCLOUD_ADMIN_PASSWORD=${ADMIN_PASSWORD}
- OWNCLOUD_MYSQL_UTF8MB4=true
- OWNCLOUD_REDIS_ENABLED=true
- OWNCLOUD_REDIS_HOST=redis
healthcheck:
test: ["CMD", "/usr/bin/healthcheck"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- 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_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_DATABASE=${DB_NAME}
- MARIADB_AUTO_UPGRADE=1
command: ["--max-allowed-packet=128M", "--innodb-log-file-size=64M"]
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-u", "root", "--password=${DB_ROOT_PASSWORD}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- 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:
- redis:/data
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
The text was updated successfully, but these errors were encountered: