Skip to content

Commit

Permalink
Add README-DEVEL to searchengine (niklasb#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrQubo authored May 28, 2021
1 parent ca8a514 commit e1f21b8
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions searchengine/README-DEVEL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# libc-database web service development

## Local deployment

1. Populate libc db with `./get` or `./add`.

1. Start the server with docker (must be run from the `searchengine/`
directory):
```sh
docker-compose up --build
```

1. Install pip dependencies from `requirements.txt`.
Example with venv:
```sh
python -m venv venv
. venv/bin/activate
pip install -U pip
pip install -U -r requirements.txt
```

1. Index libc db in elasticsearch (must be run from the `searchengine/`
directory):
```sh
python -m index ../db
```

### Cleaning up

To remove all development files run:
```sh
docker-compose down --volumes --rmi all
```

## UWSGI logging

To get app logs from UWSGI:

1. In the file `uwsgi.ini` replace line
```ini
logger=syslog:uwsgi,local7
```
with
```ini
logger=file:/uwsgi.log
```
.

1. In the file `docker-compose.yml` add
```yml
- ./uwsgi.log:/uwsgi.log
```
to `uwsgi` service volumes.

0 comments on commit e1f21b8

Please sign in to comment.