working on api + frontend; todo: switch corpus

This commit is contained in:
2019-03-24 02:08:22 +01:00
parent 8c6d6ab8ab
commit bc4e8e2cf1
12 changed files with 149 additions and 55 deletions

View File

@@ -12,7 +12,7 @@ $ git submodule update
### Database (2 containers)
Set db admin, user, pass, etc in Makefile.
Set db admin, user, pass, etc in 'Makefile'.
Spin up the database service and create users:
```bash
# $ make database-clean # opt
@@ -38,11 +38,15 @@ $ make python-env-install
$ make fill-database
```
If all goes well, we should be able to inspect the database on `0.0.0.0:8087`.
If all goes well, we should be able to inspect the database, filled with corpora, on `0.0.0.0:8087`.
### Flask backend (1 container)
Input: see Database
Relies heavily on the database. Set that up first.
```bash
# $ make backend=dev # development
$ make backend-prod
```
API endpoints:
@@ -53,17 +57,13 @@ API endpoints:
### Vue frontend (1 container)
Relies on Flask backend.
Before running `make`, you might need to set the correct api address.
Check `./src/frontend_vue/config/config_prod.json`.
bash
```
# $ make frontend-dev # development
$ make frontend-prod
```
* ngnix server
## Deployment
Preflight:
* get up DB
* prepare DB
Flight:
* start backend
* start frontend
App available on: `http://0.0.0.0:8080`.