Hello, good afternoon. I’m trying to setup a dockerized installation of ownCloud (mostly) following this guide and I’m running into a problem because the docker container of ownCloud does not use the right IP for the database container (mariadb). My docker-compose looks like this
version: '2.1'
volumes:
owncloudfiles:
driver: local
owncloudmysql:
driver: local
owncloudbackup:
driver: local
owncloudredis:
driver: local
services:
owncloud:
image: owncloud/server:10.2.0-arm64v8
restart: unless-stopped
depends_on:
- db
- redis
environment:
- OWNCLOUD_DOMAIN=owncloud.my-domain.tld
- OWNCLOUD_DB_TYPE=mysql
- OWNCLOUD_DB_NAME=owncloud
- OWNCLOUD_DB_USERNAME=owncloud
- OWNCLOUD_DB_PASSWORD=owncloud
- OWNCLOUD_DB_HOST=db
- OWNCLOUD_ADMIN_USERNAME=admin
- OWNCLOUD_ADMIN_PASSWORD=admin
- OWNCLOUD_UTF8MB4_ENABLED=true
- OWNCLOUD_REDIS_ENABLED=true
- OWNCLOUD_REDIS_HOST=redis
networks:
- web
- internal
labels:
- traefik.enable=true
- traefik.frontend.rule=Host:owncloud.my-domain.tld
- traefik.port=80
- traefik.docker.network=web
healthcheck:
test: ["CMD", "/usr/bin/healthcheck"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- ./owncloudfiles:/mnt/data
db:
image: arm64v8/mariadb:10.2
# command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
# image: webhippie/mariadb:latest-arm64
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --log-bin=mysqld-bin
restart: unless-stopped
environment:
- MARIADB_ROOT_PASSWORD=owncloud
- MARIADB_USERNAME=owncloud
- MARIADB_PASSWORD=owncloud
- MARIADB_DATABASE=owncloud
- MARIADB_MAX_ALLOWED_PACKET=128M
- MARIADB_INNODB_LOG_FILE_SIZE=64M
- MARIADB_INNODB_LARGE_PREFIX=ON
- MARIADB_INNODB_FILE_FORMAT=Barracuda
healthcheck:
test: ["CMD", "/usr/bin/healthcheck"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- ./owncloudmysql:/var/lib/mysql
- ./owncloudbackup:/var/lib/backup
networks:
- internal
redis:
image: arm64v8/redis:5
restart: unless-stopped
environment:
- REDIS_DATABASES=1
healthcheck:
test: ["CMD", "/usr/bin/healthcheck"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- ./owncloudredis:/var/lib/redis
networks:
- internal
networks:
web:
external: true
internal:
the problem with this setup is that when I run docker-compose up, I se this error over and over
[Warning] Access denied for user 'owncloud'@'172.25.0.4' (using password: YES)
but a closer inspection of the private network the containers communicate through reveals that IP 172.25.0.4 isn’t mapped to any container
"Containers": {
"af0b0b7d2f16228f4e7d583a49b0fb3297ce4b1d389be5f0eba59f99c7d3a032": {
"Name": "owncloud_redis_1",
"EndpointID": "f75137c8715cd4e9752bc804d7a9b90e0eccfbe3a4a9d71d3b1f1bd78fde71b1",
"MacAddress": "02:42:ac:19:00:03",
"IPv4Address": "172.25.0.3/16",
"IPv6Address": ""
},
"d1c48d336e00c41884af3f0d3a39e309d9a8e36cc8805c7912d4a1135f3e759e": {
"Name": "owncloud_db_1",
"EndpointID": "422c7d120d44ba4612b2ab3d944d74b83ab8ed4dcff00e21710d87c8efae9ed1",
"MacAddress": "02:42:ac:19:00:02",
"IPv4Address": "172.25.0.2/16",
"IPv6Address": ""
}
},
my guess is that somehow, the owncloud container configuration isn’t right and therefore is unable to understand that the database is in hostname db, so it tries its own IP (172.25.0.4) but that IP can’t be seen upon inspection because the container never starts. Any ideas on how to fix this?
Steps to reproduce
- Use my docker-compose to start the containers
Expected behaviour
Containers should start and communicate with each other and the server can be reached on the specified domain
Actual behaviour
Container instantiation fails and says it can’t find the database IP
Server configuration
Operating system: Ubuntu LTS 20.04 arm64 on Oracle Cloud
Web server: default from docker image owncloud/server:10.2.0-arm64v8
Database: mariadb (arm64v8/mariadb:10.2)
PHP version:
ownCloud version: owncloud/server:10.2.0-arm64v8 (can’t reach admin page)
Updated from an older ownCloud or fresh install: Trying to complete a fresh install but unable to
Where did you install ownCloud from: docker image (owncloud/server:10.2.0-arm64v8)
Signing status (ownCloud 9.0 and above): not sure what this means. Can’t even finish installation so I can’t get to any admin/login page
The content of config/config.php:
Sanitised config.php
<?php
$CONFIG = array (
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/owncloud/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/owncloud/custom',
'url' => '/custom',
'writable' => true,
),
),
'trusted_domains' =>
array (
0 => 'localhost',
),
'datadirectory' => '/mnt/data/files',
'dbtype' => 'mysql',
'dbhost' => 'db:3306',
'dbname' => 'xxx',
'dbuser' => 'xxx',
'dbpassword' => 'xxx,
'dbtableprefix' => 'oc_',
'log_type' => 'owncloud',
'supportedDatabases' =>
array (
0 => 'sqlite',
1 => 'mysql',
2 => 'pgsql',
),
'upgrade.disable-web' => true,
'default_language' => 'en',
'overwrite.cli.url' => 'http://localhost',
'htaccess.RewriteBase' => '/',
'logfile' => '/mnt/data/files/owncloud.log',
'loglevel' => 2,
'memcache.local' => '\\OC\\Memcache\\APCu',
'mysql.utf8mb4' => true,
'filelocking.enabled' => true,
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'redis',
'port' => '6379',
),
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'version' => '10.2.0.5',
);
List of activated apps:
No apps
Are you using external storage, if yes which one: Local only
Are you using encryption: no
Are you using an external user-backend, if yes which one: None
Client configuration
Browser: not relevant
Operating system: not relevant
Logs
Web server error log
Empty file
ownCloud log (data/owncloud.log)
Empty file
Browser log
HTTP 404