LivingStories-DevTeam / Living-Stories-App

4 stars 1 forks source link

Update Backend Service for Correct Flask App URL in Docker Environment #90

Closed JohnsL-U closed 11 months ago

JohnsL-U commented 11 months ago

Description: I suspect that the Spring backend service uses an incorrect URL to communicate with the Flask application (rec_engineV1.py) in the Docker environment. The PYTHON_FLASK_URL is set to http://localhost:5002, which is not reachable within Docker, as localhost refers to the individual container.

Proposed Change: Could you please look into whether if we should update the PYTHON_FLASK_URL in the Spring backend controller to use the Docker service name as defined in docker-compose.yml?

The corrected URL should be http://flask-app:5002.

Suggested Code:

final private String PYTHON_FLASK_URL = "http://flask-app:5002";
JohnsL-U commented 11 months ago

Note: Disregard the port change from 5000 to 5002. Had to do it due to MacOS service clash.