- Build Images: #cd into Frontend docker build . -t data-consumer-service
#cd into Backend docker build . -t data-provider-service
- create nework:
docker network create shinyapp-python
- Run Images:
docker run --name=data-provider-service --net=shinyapp-python -p 5000:5000 -d data-provider-service docker run --name=data-consumer-service --net=shinyapp-python -p 6233:3838 -d data-consumer-service
- Open in web server:
1. Enter the Backend directory
2. Run the following command to build the image 'reco'
docker build . -t reco
3. Run the following command to run the container 'reco_test' on port 5000
docker run --name reco_test -p5000:5000 -d reco
4. To test whether the container is running correctly. The code below (in Python) should return a JSON containing information of Data Science articles from Medium
import requests
x = requests.get('http://127.0.0.1:5000/get_articles')
x.json()
5. Code examples and sample inputs for other functions in the API are provided as comments in flask_template.py