Skip to content

Latest commit

 

History

History
65 lines (52 loc) · 2.04 KB

start_app_prod_doc.md

File metadata and controls

65 lines (52 loc) · 2.04 KB

Running the App In Production

To run the app locally, see here

Table of Contents

Docker Setup

Ensure you have docker & docker-compose installed on your computer, you can check with the following commands:

docker --version
docker-compose --version

If the above commands return an error, please install Docker and Docker-compose.

Running the app

Building the App

To build the app, from the root project directory, run the following command:

docker-compose -f docker-compose.prod.yml up -d --build

Shut down the app

To shut down the app, run the following command to remove the docker container:

docker-compose -f docker-compose.prod.yml down

Add, Update, & Delete Languages

Add a Language

docker-compose -f docker-compose.yml exec api python manage.py add_language en-sw-JW300

The language code parameter en-sw-JW300 represents {src-lang}-{tgt-lang}-{shortform}
So en-sw-JW300 represents English-Swahili using JW300 shortform
Note - A code parameter example without shortform is en-tiv-

Download available languages csv here

Update Langugaes

curl --request GET 'http://127.0.0.1:5000/update'

Check available languages

docker-compose -f docker-compose.prod.yml exec api python manage.py all_languages

Remove a language

docker-compose -f docker-compose.prod.yml exec api python manage.py remove_language en-sw-JW300

Running tests

docker-compose -f docker-compose.prod.yml exec api python manage.py tests