forked from kristjan/cjvt-valency
docker stack deployment
This commit is contained in:
20
README.md
20
README.md
@@ -111,13 +111,17 @@ Prerequisite: machine with free ports 80 and 8084.
|
||||
### Database
|
||||
Either build the database from scratch (lenghty process) using above instructions or just migrate the database from the faculty server (recommended).
|
||||
|
||||
TODO: build my-mongo
|
||||
|
||||
Build container my-mongo:
|
||||
```bash
|
||||
# run once and destroy containers
|
||||
$ make database-service
|
||||
```
|
||||
|
||||
### Backend
|
||||
Set database connection details in `/src/backend_flask/db_config.py`.
|
||||
```
|
||||
mongodb://valuser:valuserpass@127.0.0.1:27017/valdb
|
||||
Change 'valuser' and 'valuserpass' to the database user.
|
||||
```bash
|
||||
mongodb://valuser:valuserpass@my_mongo/valdb
|
||||
```
|
||||
In the above line, replace `valuser` with the username and `valuserpass` with the password that was used to create the database tables (the values were set in the root Makefile).
|
||||
|
||||
@@ -140,14 +144,20 @@ $ make build-frontend-prod
|
||||
```
|
||||
|
||||
All set, now run the stack.
|
||||
Stack configuration in `production.yaml`.
|
||||
|
||||
```bash
|
||||
# From git root
|
||||
$ make deploy-prod-stack
|
||||
```
|
||||
|
||||
### Uploading a mongo dump
|
||||
|
||||
|
||||
## Uploading a mongo dump
|
||||
There's a 15GB mongo dump containing the fully processed kres and ssj data.
|
||||
We can use that file to deploy our aplication.
|
||||
With this database, we will need a minimum of 8GB ram to serve the app.
|
||||
If the server is struggling, frontend will throw "Network errors".
|
||||
|
||||
Check `0.0.0.0:8081` and remove (or backup) the current example database `valdb`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user