Lemon nextcloud migration (#338)

This commit is contained in:
Anton Shepilov
2024-01-22 22:18:01 +03:00
committed by GitHub
parent 184b9acbe3
commit 46c3f36338
2 changed files with 11 additions and 10 deletions
@@ -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")
}
@@ -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