Skip to content

Commit

Permalink
Rely on host data folder
Browse files Browse the repository at this point in the history
Change-Id: I549e60e3e5214809a8e3573a2469f3b7c6208834
  • Loading branch information
Akron committed Dec 13, 2023
1 parent 7d7c128 commit 035ec44
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/data
/todo.org
/myindex
/sandbox
Expand Down
13 changes: 7 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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

Expand Down
12 changes: 7 additions & 5 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -44,6 +44,7 @@ services:
profiles:
- full
restart: "unless-stopped"
user: root
kustvakt:
image: "korap/kustvakt:latest"
expose:
Expand All @@ -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:
Expand Down

0 comments on commit 035ec44

Please sign in to comment.