Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
nameen Installation Docker Compose

Unser Installationsbundle für den Kommentierungsserver besteht aus mehreren DateienOur installation bundle for the comment server consists of several files:

.env

In dieser Datei werden Umgebungsvariablen festgelegt, die definieren unter welchem SSL-Port die Anwendung laufen soll und wie die Dateien heißen, in denen das (von Ihnen für Ihre Domain bereitgestellte) SSL Zertifikat und der SSL Key liegenthis file, environment variables are set that define under which SSL port the application should run. It also defines the names of the files that contain the SSL certificate and SSL key you have provided for your domain.

*_password.txtIn zwei Dateien, die mit “_password.txt” enden, wird festgelegt, welche Passwörter (initial) für die Datenbank und den globalen Administrator-User verwendet werden sollen

Two files ending with "_password.txt" define which passwords (initial) are to be used for the database and the global administrator user.

config.propertiesHier werden Einstellungen für unseren Kommentierungsserver festgelegt. Aktuell findet dort die Konfiguration des SMTP Mail-Servers statt, der dazu verwendet wird Benachrichtigungsemails zu versenden, wenn ein Benutzer in einem Kommentar erwähnt wurde

This is where the settings for our comment server are defined. Currently it is used to configure the SMTP mail server used to send notification emails when a user is mentioned in a comment.

init-commenting-db.sqlDie Initialisierung des Postgres-Servers mit einer neuen Datenbank und zwei Schemata ist hier definiert. Hier ist vom Benutzer nichts anzupassen

The initialisation of the Postgres server with a new database and two schemas is defined here. Nothing is to be adjusted here by the user.

nginx.confIn der Konfigurationsdatei befindet sich die Definition, wie der NGINX Reverse Proxy die Anfragen gegen das Kommentierungsbackend an die einzelnen Docker Container weiterleiten soll. Hier ist in der Regel vom Benutzer nichts anzupassen

The configuration file contains the definition of how the NGINX reverse proxy should forward the requests against the commenting backend to the individual Docker containers. Usually nothing needs to be adjusted by the user here.

docker-compose.yamlDie Definition welche Container für das Kommentierungsbackend erstellt werden müssen, welche Dateien vom Host-System verwendet werden dürfen und wie das interne Netzwerk aufgebaut ist muss in der Regel nicht angepasst werden

The definition of which containers must be created for the commenting backend, which files may be used by the host system and how the internal network is structured does not usually need to be adapted.

commenting.war

In dieser Datei liegt die Logik für das Kommentierungsbackend, sie wird automatisch in dem Tomcat-Container in Docker installiert.

Installationsvorgang

Installieren Sie Docker wie hier beschrieben

This file contains the logic for the commenting backend and is automatically installed in the Tomcat container in Docker.

Installation process

  1. Install Docker as described here: https://docs.docker.com/engine/install/

  2. Entpacken Sie das Installationsbundle und die Dateien aus dem Installationsbundle kopieren Sie auf das Docker-Hostsystem an einen beliebigen Ort.

  3. Sie fügen Ihr SSL Zertifikat mit dem Dateinamen “ssl_certificate.crt” und den dazugehörigen privaten Schlüssel mit dem Dateinamen “ssl_certificate.pem” an dem selben Ort wie in Schritt 1 ein. Bei unterschiedlichen Pfaden oder Dateinamen, muss die Datei “.env” angepasst werden.

  4. Wenn sie einen anderen Port als “3333” für den Server verwenden möchten, so passen Sie die in der Datei “.env” an.

  5. In der “commenting_db_password.txt” Datei definieren Sie das Passwört für die Datenbank der Userverwaltung und der Kommentarablage. Dieses wird intern an die entsprechenden Container übermittelt.

  6. In der Datei “keycloak_admin_password.txt” definieren Sie das Passwort für den Administrator des Kommentarbackends. Dieser besitzt die Berechtigung Kommentare zu lesen, zu schreiben, zu bearbeiten, zu löschen und neue Benutzer zu definieren. Sie benötigen dessen Passwort also um sich initial in unsere Komponenten und die Verwaltungsoberfläche einzuloggen. Der Benutzername lautet hier “admin”. Neu angelegten Benutzern können dann die Rollen “viewer”, “editor” oder “admin” zugewiesen werden.

  7. Ist die Konfiguration vollständig, so können Sie in der Kommandozeile in dem Ordner des Installationsbundles den Befehl “docker-compose up” ausführen. Damit werden alle benötigten Komponenten gestartetUnpack the installation bundle and copy the files from the installation bundle to the Docker host system in any location.

  8. You insert your SSL certificate with the file name "ssl_certificate.crt" and the corresponding private key with the file name "ssl_certificate.pem" in the same location as in step 1. If the paths or file names are different, the ".env" file must be adapted.

  9. If you want to use a port other than "3333" for the server, adjust the port in the ".env" file.

  10. In "commenting_db_password.txt" file you define the password for the user administration database and the comment repository. This is transmitted internally to the corresponding containers.

  11. In the file "keycloak_admin_password.txt" you set password for the comment backend administrator. The administrator is authorised to read, write, edit and delete comments and to create new users. You will need this password to log in to our components and the admin interface for the first time. The username here is "admin". Newly created users can then be assigned the roles "viewer", "editor" or "admin".

  12. When the configuration is complete, you can run "docker-compose up" from the command line in the installation bundle folder. This will launch all the required components.

  13. After the first start, the client secret must be read from the Keycloak UI under <server URL>/auth for the "frontend" client. This should then be inserted into the "keycloak_client_secret.txt". A subsequent restart via "docker compose stop" and "docker compose up" is necessary.

Once you have successfully installed the service, there are three things you can do to check that it is working:

  • At the root URL to the service, a JSON should appear with information about the service and the installed version.

  • <Server URL>/auth should open the user interface of Keycloak, where you can log in with the initial admin user data by clicking on "Administration Console". Here you can also connect other ident providers to our service. For example, Active Directory via SAML and external OAuth providers. For more information, please consult the Keycloak documentation.

  • Finally, please check whether our user interface for the backend appears under <server URL>/commenting/administration/. Here you can, with a valid user (e.g. the admin again), view existing comments, edit them and also create new ones. You have the option of creating new users and authorising them to use context combinations.