In machine-learning-client/
and web-app/
, create separate .env
files as instructed.
For detailed instructions on running the machine-learning client, see machine-learning-client/README.md
.
For detailed instructions on running the web app without using containers, see web-app/README.md
.
In the project root directory, where docker-compose.yaml
is, run:
docker compose up
This will start 2 containers:
-
web app container, on port 5001 on your machine
-
mongodb container, on port 37017 on your machine (NOT default 27017)
You can verify that both containers are up and running using command:
docker container ls
We highly recommand injecting sample data into the database by using mongoimport
.
Run mongoimport
from the system command line, not the mongosh
shell.
In the project root directory, while the mongodb container is running, run:
mongoimport --uri "mongodb://localhost:37017/awstranscribe?retryWrites=true&w=majority" --collection=jobs --file=data/sample_data.json --jsonArray
Then you can see the web app with sample data running at http://localhost:5001/.
In machine-learning-client/
, while the mongodb container is running, run:
python3 -m pytest
To see coverage report, run:
coverage run -m pytest
coverage report
Stop the currently running web-app container while keeping the mongodb container by running command:
docker container stop containerized-app-exercise-team3-webapp-1
Change MONGO_URI
in web-app/.env
to MONGO_URI="mongodb://localhost:37017/awstranscribe?retryWrites=true&w=majority"
.
In web-app/
run:
python3 -m pytest
To see coverage report, run:
coverage run -m pytest
coverage report