cjvt-valency/README.md

70 lines
1.0 KiB
Markdown
Raw Normal View History

# cjvt-valency
2019-03-17 16:25:59 +00:00
Required submodules:
* `https://gitea.cjvt.si/kristjan/cjvt-corpusparser.git`
```bash
$ git submodule init
2019-03-23 19:27:23 +00:00
$ git submodule update
2019-03-17 16:25:59 +00:00
```
2019-03-07 08:00:01 +00:00
## Components
### Database (2 containers)
2019-03-23 19:27:23 +00:00
Set db admin, user, pass, etc in Makefile.
Spin up the database service and create users:
2019-03-17 16:25:59 +00:00
```bash
# $ make database-clean # opt
$ make database-service
$ make database-users
```
Populate the database with data form files:
2019-03-07 08:00:01 +00:00
* ssj500k.xml
* kres.xml
* kres_SRL.json
2019-03-17 16:25:59 +00:00
Set path to files in `Makefile`.
```bash
# spin up a container with python env
$ make python-env
2019-03-07 08:00:01 +00:00
2019-03-17 16:25:59 +00:00
# install our packages
$ make python-env-install
2019-03-07 08:00:01 +00:00
2019-03-17 16:25:59 +00:00
# run the code
2019-03-23 19:27:23 +00:00
$ make fill-database
2019-03-17 16:25:59 +00:00
```
2019-03-07 08:00:01 +00:00
2019-03-17 16:25:59 +00:00
If all goes well, we should be able to inspect the database on `0.0.0.0:8087`.
2019-03-07 08:00:01 +00:00
### Flask backend (1 container)
Input: see Database
API endpoints:
* GET word list (pre-cached)
* GET reduced frames (pre-cached)
* POST senses
* User auth logic
### Vue frontend (1 container)
* ngnix server
2019-03-07 08:11:54 +00:00
## Deployment
2019-03-07 08:19:56 +00:00
Preflight:
2019-03-07 08:11:54 +00:00
* get up DB
2019-03-07 08:19:56 +00:00
* prepare DB
Flight:
2019-03-07 08:11:54 +00:00
* start backend
2019-03-07 08:19:56 +00:00
* start frontend