Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better documentation for how to interact with containers outside Laradock? #3107

Open
marbuser opened this issue Nov 29, 2021 · 0 comments
Open

Comments

@marbuser
Copy link

marbuser commented Nov 29, 2021

I was hoping to request some better documentation on how we can link/connect with containers outside Laradock since I feel it's a pretty common use-case for web apps.

Example:
I have a REST API hosted in another container. I have my laravel app using Laradock as another container.
I want to link them together so they can communicate and the Laravel container can grab the hostname of the REST container via .env service name and send requests to it.

I've managed to get it working using my own barebones docker-compose file, but I can't seem to get it working with the Laradock file and I can't seem to figure out where it's going wrong since there is quite a lot to go through and I'm still fairly new to docker.

When I try it in Laradock, it just ignores the .env and doesn't substitute it for proper hostname, so it sends requests to <service_name>:443 instead of the correct hostname substitution.

EDIT:
Another example, just discovered if I do;
docker-compose exec nginx bash and then ping -c 2 service_name it sends packets, but then if I try and do the same from workspace it fails with seemingly no explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant