Code Monkey home page Code Monkey logo

0000ffisland's Introduction

Nextcloud Howto für 0000ffIsland

Beschreibt, wie lokal mit Docker ein paar Dinge ausprobiert werden können.

Nextcloud im Container starten

  • Docker Netzwerk bereitstellen - docker network create example

  • nextcloud starten - docker run --net example --name nextcloud -p 8080:80 nextcloud:16-apache

  • Hinweis: Innerhalb des Docker Netzwerks ist die nextcloud Instanz unter nextcloud erreichbar

  • Browser öffnen mit http://localhost:8080/

shell für container öffnen

  • Shell als root - docker exec -i -t nextcloud /bin/bash

  • Shell als www-data (z.B. für Etherpad siehe unten) - docker exec -i -t nextcloud -u www-data /bin/bash

Konfiguration Volltextsuche

Rahmenbedingungen

  • Fulltextsearch plugin für nextcloud gibt es nur für nextcloud 16.x

  • Fulltextsearch plugin für nextcloud braucht elastic-Search 7.3.2 (oder ne andere 7)

  • Elasticsearch muss das ingest-plugin installiert haben (ingest wandelt Binärformat in JSON um, damit elasticsearch dieses JSON indizieren kann)

Vorgehen (lokal)

  1. Elasticsearch mit Plugin ingest konfigurieren und starten

    1. Ins Verzeichnis wechsel wo angepastes Dockerfile liegt - cd elastic

    2. Angepasstes Dockerimage bauen - docker build -t elastic_blau .

    3. Prüfen, ob Image erfolgreich vorliegt - docker images (Im Output sollte irgendwo elastic_blau stehen)

    4. Angepastes Image starten - docker run --net example --name elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elastic_blau

    5. Prüfen, ob elasticsearch läuft - http://localhost:9200/ öffnen

  2. Konfigurieren Fulltext-plugin in nextcloud

    1. Folgende Plugins installieren full text search, Full text search - Elasticsearch Platform, ` Full text search - Files`

    2. Fulltext-plugin konfigurieren

      1. Adresse Servlet ⇒ http://elastic:9200

      2. Index ⇒ nextcloud (Name ist egal, Index wird einfach neu angelegt)

      3. Quellen ⇒ Lokale Dateien anhacken

      4. Suchlupe aktivieren

    3. Konfiguration prüfen

      1. In Nexcloud Webinterface eine Textdatei anlegen mit einigen Worten, die gefunden werden kann

      2. einloggen in nextcloud instanz shell - docker exec -u www-data -i -t nextcloud /bin/bash

      3. Testen der Fulltextsuche - php occ fulltextsearch:test

      4. Indizieren auslösen - php occ fulltextsearch:index

      5. Weitere Kommandos - https://github.com/nextcloud/fulltextsearch/wiki/Commands

      6. Suche in nextcloud nach einem Inhalt der Datei

Unklar

  • Wann wird automatisch indiziert, oder muss das immer manuel erfolgen ⇒ crontab einrichten

  • Sicherheitsüberlegungen

  • Welche Binärformate werden unterstützt

Konfiguration Etherpad

Haben wir mal ausprobiert, aber hier sind nur noch Gedankenstützen

ETHERPAD Settings → Additional Settings → Enable Etherpad Etherpad Host: “https://etherpad.wikimedia.org”

MIME-type einstellen: Terminal/SFTP

Kopieren von “mimetypemapping.json” cd /var/www/html/config cp ../resources/config/mimetypemapping.dist.json .

Umbenennen: /var/www/html/config# mv mimetypemapping.dist.json mimetypemapping.json

  1. Klammer löschen: sed 's/}//' mimetypemapping.json >neu

Eintrag ans Ende hinzufügen, an Datei “neu” anfügen echo ‘,”pad": ["application/x-ownpad”]’ >> neu

Eintrag ans ende hinzufügen, an Datei “neu” anfügen echo '"calc": ["application/x-ownpad"]'>> neu

Eintrag ans ende hinzufügen, an Datei “neu” anfügen echo } >> neu

Datei umbenennen cp neu mimetypemapping.json

Loggin als www-data: docker exec -i -t nextcloud -u www-data /bin/bash

Pfad: cd /var/www/html

Cmd ausführen: php occ files:scan -all

TODO

  • Entscheidung, ob Elasticsearch selber hosten, oder als Service einkaufen

Anhang

Markupsprachen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.