by Ning H.
Hi,
I have an LTI app that's running in Docker on my local machine, and I want to call Moodle web services with it. Moodle is also running on Docker on my local machine.
The client I am using is https://github.com/mudrd8mz/node-moodle-client.
Currently, the Moodle and app containers are in the same Docker network, so I can only call the Moodle web server with the IP address it's given in Docker (172.19.0.x). When the Moodle web server receives the GET request, it tries to redirect the app to http://localhost:8000 which returns a connection refused error to the app.
What I've tried:
- Changing Moodle's wwwroot to http://172.19.0.x
- Putting the Moodle web server in the Docker host network
- Adding the Moodle web server 172.19.0.x to /etc/hosts in the Moodle web server container and my personal computer as localhost
- Adding "localhost" as an alias for the Moodle web server container
What can I do to call web services from the app while also using Docker?
Thank you.