tusmanakhter / MigrantHub

MIT License
4 stars 3 forks source link

Docker compose service recommender #201

Closed iamlax closed 5 years ago

iamlax commented 5 years ago

This adds containerization to the service recommender iis service

LESS INSTANCES MEANS CHEAPER COMPUTING COMPARED TO CURRENT SETUP.

This is a temp instance that i ran the docker-compose on to test the recommendation service

Application: http://34.73.211.38/

Recommender Endpoint: http://34.73.211.38:8128/api/recommendation/laxman_20@hotmail.com

Data Model Endpoint: http://34.73.211.38:8060/api/model

Temporary Account:

User: laxman_20@hotmail.com Pass: 123456789

READ BEFORE TESTING

  1. To verify that the recommender is working make sure u have the key.json as well.
  2. Copy the "# -- Production Recommendation Service ----" section from .env_local to .env on server Replace the fields to match ur instance for docker local it'll be something like
# -- Production Recommendation Service ----
RECOMMENDATION_SERVICE_PROTOCOL=http://
RECOMMENDATION_SERVICE_DOMAIN=192.168.99.100
RECOMMENDATION_SERVICE_PATH=api/recommendation
RECOMMENDATION_SERVICE_PORT=8128

Use scripts run_docker_dev.sh and run_docker_prod.sh to run application.

To test docker dev:

Run script run_docker_dev.sh. (make sure you are in a docker environment)

Test app as usual.

To test docker prod:

Run script run_docker_prod.sh. (make sure you are in a docker environment)