Manage the user objectives
This microservice works on port 5004.
Export the address and the port of the data-service microservice,
the default is 127.0.0.1:5002
.
A smart way to do this is to create a file variables.sh
in the project root, as follows.
#!/bin/bash
export DATA_SERVICE="127.0.0.1:5002"
export OBJECTIVE_SERVICE="127.0.0.1:5004"
You can load the variables with source variables.sh
.
pip install -r requirements.txt
pip install pytest pytest-cov
python setup.py develop
pip install -r requirements.txt
python setup.py install
python objectives/app.py
Important note: use python 3.6.
A Docker Image is available on the public Docker Hub registry. You can run it with the command below.
docker run -d --name objectives-service ytbeepbeep/objectives-service
Important note: if you need to expose the service outside you Docker installation (e.g. to third part services) use the option -p 5002:5002
You can also build your own image from this repository.
- Build with
docker build -t ytbeepbeep/objectives-service .
- Run as usually, with the commands specified above