Migrate from custom Docker compose to all-in-one Docker compose

Hi! I have this Docker compose setup with:

  • High availability backend
  • Notify PUSH
  • 2FA
  • Collabora
  • REDIS
  • External directory for Next Cloud data files
    • volumes:
      • /media/data/nextcloud/data/html:/var/www/html
      • /media/data/nextcloud/data/config:/var/www/html/config
      • /media/data/nextcloud/data/cloud_data:/var/www/html/data
  • External MySQL server
  • External email setup

¿Is it possible to keep most of the config (IE data dirs, email setup, MySQL DB) and use the suggested all-in-one Docker compose? posted in the official GH repo here?

Thanks!

My current Docker compose file

version: '2'

services:
  nextcloud:
    image: 'nextcloud:28.0.0-fpm'
    restart: always
    container_name: nextcloud-app
    volumes:
      - /media/data/nextcloud/data/html:/var/www/html
      - /media/data/nextcloud/data/config:/var/www/html/config
      - /media/data/nextcloud/data/cloud_data:/var/www/html/data
    depends_on:
      - nextcloud_redis
      
  nextcloud_notify_push:
    image: 'nextcloud:28.0.0-fpm'
    restart: always
    container_name: nextcloud-notify-push
    volumes:
      - /media/data/nextcloud/data/html:/var/www/html
      - /media/data/nextcloud/data/config:/var/www/html/config:ro
      - /media/data/nextcloud/data/cloud_data:/var/www/html/data
    environment:
      - PORT=7867
      - NEXTCLOUD_URL=https://cloud.XXXXXXXXX.com/
    ports:
      - 7867:7867
    entrypoint: /var/www/html/custom_apps/notify_push/bin/x86_64/notify_push /var/www/html/config/config.php
    depends_on:
      - nextcloud
      - nextcloud_redis

  nextcloud_nginx:
    image: 'nginx'
    restart: always
    container_name: nextcloud-nginx
    volumes:
      - /media/data/nextcloud/data/html:/var/www/html
      - /media/data/nextcloud/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
    ports:
      - 3080:80
    links:
      - nextcloud
    depends_on:
      - nextcloud

  nextcloud_redis:
    image: 'redis:alpine'
    restart: always
    container_name: nextcloud-redis
    volumes:
      - /media/data/nextcloud/redis-data:/data

Current NextCloud config file

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'nextcloud-redis',
    'port' => 6379,
  ),
  'instanceid' => 'XXXXXXXX',
  'passwordsalt' => 'XXXX/XXXXXXXX',
  'secret' => 'XXXXXXXX+jMY/XXXXXXXX/XXXXXXXX',
  'trusted_domains' => 
  array (
    0 => 'cloud.XXXXXXXX.com.ar',
    1 => 'cloud.XXXXXXXX.com',
    2 => 'lucas.XXXXXXXX.com.ar',
    3 => 'localhost',
  ),
  'trusted_proxies' => 
  array (
    0 => 'cloud.XXXXXXXX.com.ar',
    2 => 'cloud.XXXXXXXX.com',
    3 => 'lucas.XXXXXXXX.com.ar',
    4 => '10.0.0.XXXX',
    5 => '127.0.0.1',
    6 => '172.19.0.0/24',
    7 => '172.20.0.0/24',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '28.0.0.11',
  'overwrite.cli.url' => 'https://cloud.XXXXXXXX.com',
  'dbname' => 'XXXXXXXX',
  'dbhost' => '10.0.0.XXXX',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'XXXXX',
  'dbpassword' => 'XXXXX',
  'installed' => true,
  'logtimezone' => 'America/Argentina/Buenos_Aires',
  'forcessl' => false,
  'maintenance' => false,
  'default_language' => 'es',
  'default_phone_region' => 'AR',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'martin',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.XXXXXX.com',
  'mail_smtpport' => '465',
  'mail_domain' => 'XXXXXX.com',
  'mail_smtpname' => 'XXXXXX@XXXXXX.com',
  'mail_smtppassword' => 'XXXXXX',
  'loglevel' => 0,
  'overwriteprotocol' => 'https',
  'overwritehost' => 'cloud.XXXXXX.com',
  'theme' => '',
  'mysql.utf8mb4' => true,
  'trashbin_retention_obligation' => 'auto, 30',
  'versions_retention_obligation' => 'auto, 30',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' => 
  array (
    0 => 'admin',
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
  ),
);

Hi, see https://github.com/nextcloud/all-in-one/blob/main/migration.md

1 Like