Rely on host data folder
Change-Id: I549e60e3e5214809a8e3573a2469f3b7c6208834
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 @@
`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 @@
}
```
+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 @@
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 @@
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 @@
profiles:
- full
restart: "unless-stopped"
+ user: root
kustvakt:
image: "korap/kustvakt:latest"
expose:
@@ -57,11 +58,12 @@
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: