From 46c3f363382e6a93551b4d623adbf0672a7ad875 Mon Sep 17 00:00:00 2001 From: Anton Shepilov Date: Mon, 22 Jan 2024 22:18:01 +0300 Subject: [PATCH] Lemon nextcloud migration (#338) --- .../nextcloud-migration/src/express_server.ts | 17 +++++++++-------- .../tdrive-nextcloud-migration/Dockerfile | 4 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/tdrive/backend/utils/nextcloud-migration/src/express_server.ts b/tdrive/backend/utils/nextcloud-migration/src/express_server.ts index f7dc80b61..20e3c3101 100644 --- a/tdrive/backend/utils/nextcloud-migration/src/express_server.ts +++ b/tdrive/backend/utils/nextcloud-migration/src/express_server.ts @@ -1,5 +1,5 @@ import express, { Express, Request, Response } from "express"; -import { NextcloudMigration, NextcloudMigrationConfiguration } from './nextcloud_migration.js'; +import { NextcloudMigration, NextcloudMigrationConfiguration } from './nextcloud_migration'; import { logger } from "./logger" import { UserProviderType } from "./user/user_privider"; @@ -10,7 +10,7 @@ app.use(express.json()); app.use(express.urlencoded()); const config: NextcloudMigrationConfiguration = { - ldap: { + shell: { baseDn: process.env.LDAP_BASE!, url: process.env.LDAP_URL!, }, @@ -30,12 +30,13 @@ const config: NextcloudMigrationConfiguration = { userProvider: process.env.USER_PROVIDER! as UserProviderType } -if (!config.ldap.baseDn) { - throw new Error("LDAP base has to be set") -} -if (!config.ldap.url) { - throw new Error("LDAP url has to be set") -} +// if (!config.shell.baseDn) { +// throw new Error("LDAP base has to be set") +// } +// if (!config.shell.url) { +// throw new Error("LDAP url has to be set") +// } + if (!config.drive.url) { throw new Error("Twake Drive url host has to be set") } diff --git a/tdrive/docker/tdrive-nextcloud-migration/Dockerfile b/tdrive/docker/tdrive-nextcloud-migration/Dockerfile index d634133b6..351cf909b 100644 --- a/tdrive/docker/tdrive-nextcloud-migration/Dockerfile +++ b/tdrive/docker/tdrive-nextcloud-migration/Dockerfile @@ -1,7 +1,7 @@ # Use an official Node.js runtime as the base image FROM node:bullseye -run apt update && apt -y dist-upgrade +RUN apt update && apt -y dist-upgrade RUN apt install dirmngr RUN echo "deb http://ppa.launchpad.net/nextcloud-devs/client/ubuntu zesty main" >> /etc/apt/sources.list.d/nextcloud-client.list @@ -9,7 +9,7 @@ RUN echo "deb-src http://ppa.launchpad.net/nextcloud-devs/client/ubuntu zesty ma RUN apt-key adv --recv-key --keyserver keyserver.ubuntu.com AD3DD469 -RUN apt update +RUN apt update -y RUN apt install --assume-yes nextcloud-desktop-cmd