Skip to content

Commit

Permalink
Lemon nextcloud migration (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
shepilov authored Jan 22, 2024
1 parent 184b9ac commit 46c3f36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions tdrive/backend/utils/nextcloud-migration/src/express_server.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand All @@ -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!,
},
Expand All @@ -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")
}
Expand Down
4 changes: 2 additions & 2 deletions tdrive/docker/tdrive-nextcloud-migration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# 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
RUN echo "deb-src http://ppa.launchpad.net/nextcloud-devs/client/ubuntu zesty main" >> /etc/apt/sources.list.d/nextcloud-client.list

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

Expand Down

0 comments on commit 46c3f36

Please sign in to comment.