add docs for viewing logs (#63)
parent
415e50510c
commit
f284809a08
17
README.md
17
README.md
|
@ -4,6 +4,7 @@
|
|||
The OAPEN Suggestion Service uses natural-language processing to suggest books based on their content similarities. To protect user privacy, we utilize text analysis rather than usage data to provide recommendations. This service is built on the proof-of-concept and paper by Ronald Snijder from the OAPEN Foundation, and you can [read the paper here](https://liberquarterly.eu/article/view/10938).
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Installation (Server)](#installation-server)
|
||||
+ [DigitalOcean Droplet](#digitalocean-droplet)
|
||||
+ [DigitalOcean Managed Database](#digitalocean-managed-database)
|
||||
|
@ -12,6 +13,7 @@ The OAPEN Suggestion Service uses natural-language processing to suggest books b
|
|||
+ [SSL Certificate](#ssl-certificate)
|
||||
* [Running](#running)
|
||||
* [Endpoints](#endpoints)
|
||||
* [Logging](#logging)
|
||||
* [Service Components](#service-components)
|
||||
+ [Suggestion Engine](#suggestion-engine)
|
||||
+ [API](#api)
|
||||
|
@ -144,6 +146,7 @@ The OAPEN Suggestion Service uses natural-language processing to suggest books b
|
|||
## Running
|
||||
|
||||
You can start the services by running the following command in the directory where you cloned the repo:
|
||||
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
@ -177,6 +180,18 @@ The API provides access to the following endpoints:
|
|||
- e.g. http://localhost:3001/api/20.400.12657/47581/?threshold=5
|
||||
- `http://localhost:3001/api/{handle}/ngrams`
|
||||
- e.g. http://localhost:3001/api/20.400.12657/47581/ngrams
|
||||
|
||||
## Logging
|
||||
|
||||
Log files are automatically generated by Docker for each container. The log files can be found in `/var/lib/docker/containers/<container-id>/*-json.log`.
|
||||
|
||||
To find a container's id, run `docker ps -a`.
|
||||
|
||||
To view log files, run `tail -f /var/lib/docker/containers/<container-id>/*-json.log`.
|
||||
|
||||
After some time, log files may take up too much disk space. To clear all logs on the host machine, run `truncate -s 0 /var/lib/docker/containers/*/*-json.log`
|
||||
|
||||
To clear logs for a specific container, run `truncate -s 0 /var/lib/docker/containers/<container-id>/*-json.log`
|
||||
|
||||
## Service Components
|
||||
|
||||
|
@ -284,4 +299,4 @@ Configuration info for the web demo is in [`web/README.md`](web/README.md).
|
|||
- RUN_CLEAN=0
|
||||
```
|
||||
To prevent this behavior.
|
||||
4. See [Running](#running)
|
||||
4. See [Running](#running)
|
||||
|
|
Loading…
Reference in New Issue