From 035ec442eef7c55076ec45ba753eceac925ce7fe Mon Sep 17 00:00:00 2001 From: Akron Date: Wed, 13 Dec 2023 13:28:29 +0100 Subject: [PATCH] Rely on host data folder Change-Id: I549e60e3e5214809a8e3573a2469f3b7c6208834 --- .gitignore | 1 + Readme.md | 13 +++++++------ compose.yaml | 12 +++++++----- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 0637fd6..b6e7988 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/data /todo.org /myindex /sandbox diff --git a/Readme.md b/Readme.md index 67e7118..551a67b 100644 --- a/Readme.md +++ b/Readme.md @@ -42,16 +42,11 @@ This will make the frontend be available at `localhost:64543`. To run the service with an additional user management system, -initialize and start the service with +initialize with ```shell $ INDEX=./index docker-compose -p korap --profile=init up ``` - -```shell -$ INDEX=./index docker-compose -p korap --profile=full up -``` - The init step creates a file called `super_client_info` in the current directory that acts as a shared secret between the frontend and the backend. To enable this in Kalamar, the configuration file `kalamar.production.conf` @@ -68,6 +63,12 @@ needs to point to the mounted file, so it requires a configuration along the lin } ``` +Then the service can be started with + +```shell +$ INDEX=./index docker-compose -p korap --profile=full up +``` + ## Corpus Conversion diff --git a/compose.yaml b/compose.yaml index 6e14cea..adff419 100644 --- a/compose.yaml +++ b/compose.yaml @@ -16,7 +16,7 @@ services: command: super_client_info kalamar /kalamar/data/super_client_info volumes: - type: bind - source: "${PWD}" + source: "${PWD}/data/" target: "/kalamar/data" profiles: - full @@ -31,10 +31,10 @@ services: KALAMAR_API: "http://kustvakt-full:8089/api/" volumes: - type: bind - source: "${PWD}/kalamar.production.conf" + source: "${PWD}/data/kalamar.production.conf" target: "/kalamar/kalamar.production.conf" - type: bind - source: "${PWD}/super_client_info" + source: "${PWD}/data/super_client_info" target: /kalamar/super_client_info depends_on: kustvakt-full: @@ -44,6 +44,7 @@ services: profiles: - full restart: "unless-stopped" + user: root kustvakt: image: "korap/kustvakt:latest" expose: @@ -57,11 +58,12 @@ services: image: "korap/kustvakt:latest-full" expose: - 8089 + user: root volumes: - "${INDEX}:/kustvakt/index:z" - type: bind - source: "${PWD}/super_client_info" - target: /kustvakt/client/super_client_info + source: "${PWD}/data/" + target: /kustvakt/data/ profiles: - full depends_on: