0

I tried to use official documentation https://github.com/owncloud-docker/serverwith docker-compose. My .env file:

OWNCLOUD_VERSION=10.0
OWNCLOUD_DOMAIN=localhost
ADMIN_USERNAME=admin
ADMIN_PASSWORD=admin
HTTP_PORT=8080

My docker-compose.yml:

version: '2.0'

volumes:
  files:
    driver: local
mysql:
   driver: local
backup:
   driver: local
redis:
   driver: local

services:
  owncloud:
    image: owncloud/server:${OWNCLOUD_VERSION}
    restart: always
    ports:
      - ${HTTP_PORT}:80
    depends_on:
      - db
      - redis
    environment:
      - OWNCLOUD_DOMAIN=${OWNCLOUD_DOMAIN}
      - OWNCLOUD_DB_TYPE=mysql
      - OWNCLOUD_DB_NAME=owncloud
      - OWNCLOUD_DB_USERNAME=owncloud
      - OWNCLOUD_DB_PASSWORD=owncloud
      - OWNCLOUD_DB_HOST=db
      - OWNCLOUD_ADMIN_USERNAME=${ADMIN_USERNAME}
      - OWNCLOUD_ADMIN_PASSWORD=${ADMIN_PASSWORD}
      - OWNCLOUD_MYSQL_UTF8MB4=true
      - OWNCLOUD_REDIS_ENABLED=true
      - OWNCLOUD_REDIS_HOST=redis
   volumes:
      - files:/home/owncloud
db:
   image: webhippie/mariadb:latest
   restart: always
   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
   volumes:
     - mysql:/var/lib/mysql
     - backup:/var/lib/backup

 redis:
   image: webhippie/redis:latest
   restart: always
   environment:
     - REDIS_DATABASES=1
   volumes:
     - redis:/var/lib/redis

When I start with docker-compose

# docker-compose up -d

all 3 containers are in UP state

# docker-compose ps

Name Command State Ports

neu_db_1         /usr/bin/entrypoint /bin/s ...   Up      3306/tcp                       
neu_owncloud_1   /usr/bin/entrypoint /usr/b ...   Up      0.0.0.0:8080->80/tcp, 8080/tcp 
neu_redis_1      /usr/bin/entrypoint /bin/s ...   Up      6379/tcp

but

# docker-compose logs db
db_1        | 181205 16:18:44 mysqld_safe Logging to '/var/lib/mysql/e8d3b45f44da.err'.
db_1        | 181205 16:18:45 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
db_1        | 181205 16:18:45 mysqld_safe Logging to '/var/lib/mysql/e8d3b45f44da.err'.
db_1        | 181205 16:18:46 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

And file /var/lib/mysql/e8d3b45f44da.err is not available on system.

# docker-compose logs owncloud
Attaching to neu_owncloud_1
owncloud_1  | Creating volume folders...
owncloud_1  | Creating hook folders...
owncloud_1  | Waiting for MySQL...
owncloud_1  | wait-for-it: waiting 180 seconds for db:3306
owncloud_1  | wait-for-it: timeout occurred after waiting 180 seconds for db:3306

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.