Connect 2 Laravel instances with Magento #738
Replies: 2 comments
-
@SilinMykola Each warden environment runs with its own network, so your Magento environment won't be able to reach any other running environment (like your Laravels) by design. You can expose individual containers to the other networks but that has to be done through your Something like the following (can't guarantee this would work). Not sure if there's a simpler way or not, but this is what first popped into my head without running a fully custom project setup (2 Laravel's plus a Magento behind a single Nginx server).
Project B/.warden/.warden-env.yml version: "3.5"
services:
php-fpm:
networks:
- project_a_default
- project_c_default Then in your Project A code you should be able to reference the container name from Project B, which then references the container name from Project C. Project A/test.php send request to |
Beta Was this translation helpful? Give feedback.
-
@bap14 Hello! Thanks for your help! I tried to make like you said, but it doesn't help. I tried to add to the settings file all 3 networks, and made |
Beta Was this translation helpful? Give feedback.
-
Hello to everybody!
I have a problem with my project instance. I have 3 parts of the project: two parts on the Laravel and one part is Magento 2. I installed all 3 parts in separate environments. All parts I can open in the browser. But I need a connection between them. Laravel App should export/import the data to/from Magento through the second instance of Laravel.
I tried to run a job for export and got an error with the connection.
cURL error 7: Failed to connect to bridge.warden.test port 443: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://bridge.warden.test/api/auth?email=test@test.com&password=password
For connection, I should add the correct bridge URL and IP address to Laravel App. I added the URL the same as TRAEFIK_DOMAIN and added the IP from the docker nginx container. Also, I tried to use 127.0.0.1. Maybe I should use host.docker.internal with the port as an IP?
How to fix it?
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions