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";
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 tohttp://localhost:5002
, which is not reachable within Docker, aslocalhost
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 indocker-compose.yml
?The corrected URL should be
http://flask-app:5002
.Suggested Code: