services: owncloud: image: owncloud/server:latest container_name: owncloud-server-${IP}-${PORT} restart: always ports: - ${IP}:${PORT}:8080 depends_on: - mariadb - redis environment: - OWNCLOUD_DOMAIN=${OWNCLOUD_DOMAIN} - OWNCLOUD_TRUSTED_DOMAINS=${OWNCLOUD_TRUSTED_DOMAINS} - OWNCLOUD_DB_TYPE=mysql - OWNCLOUD_DB_NAME=owncloud - OWNCLOUD_DB_USERNAME=root - OWNCLOUD_DB_PASSWORD=${DBPASS} - 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: - ${DATA_DIR}/data/files:/mnt/data mariadb: image: mariadb:10.11 # minimum required ownCloud version is 10.9 container_name: owncloud-mariadb restart: always environment: - MYSQL_ROOT_PASSWORD=${DBPASS} - MYSQL_USER=owncloud - MYSQL_PASSWORD=${DBPASS} - MYSQL_DATABASE=owncloud - MARIADB_AUTO_UPGRADE=1 command: ["--max-allowed-packet=128M", "--innodb-log-file-size=64M"] healthcheck: test: ["CMD", "mysqladmin", "ping", "-u", "root", "--password=${DBPASS}"] interval: 10s timeout: 5s retries: 5 volumes: - ${DATA_DIR}/data/sql:/var/lib/mysql redis: image: redis:6 container_name: owncloud-redis restart: always command: ["--databases", "1"] healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 volumes: - ${DATA_DIR}/redis:/data