-
Notifications
You must be signed in to change notification settings - Fork 592
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
Developing in Docker but cache connection required during package discovery process #828
Comments
We can confirm a similar issue. That the cache connection is required is a big drawback for using Telescope. In addition to the initial descriptionIt’s not possible to run any command, not even The issue in our use caseBeside of the initial raised issue description, there is an additional use case: If a builder container is used, based on hub.docker.com/_/composer for example, it’s usually not the case to have the redis dependency set up nor to have ext-redis installed (except if it’s added in a custom build, which just increases container overhead without actual benefit). Steps to reproduce
|
Hello everyone. Since a majority of developers aren't experiencing this particularly issue it's hard to focus our attention to solving this (more so because we're not using Docker ourselves). If you want to get Telescope to work better with Docker we're welcoming prs. Thanks for raising this. |
Same issue here |
It's just not a docker problem, you can have the issue anywhere where you don't have a redis service running. The problem it's the discover will touch the cache, you can fix this by settings the .env with:
I'm doing this in a step before running composer install and resetting it after all artisan commands run. |
Same error here.
|
I would argue it is normally not an issue since nobody would realistically run telescope without their cache instance running. Therefore, my aim of this issue was to ask for a feature to turn off connection requirement (with or without a special option) during package discovery. |
Where do you put this code? |
@screw - This goes in your |
In our case, the best solution has also been disabling the dump watcher in the telescope config file (
|
Description:
This issue has been raised before #620. But the resolution was really a work around at that point. I wanted to bring the issue forth once more.
I'm using Docker Compose as a development and production environment. And previously, "Disabling telescope for builds seems a reasonable solution." does not work in my case.
My Docker Compose file includes the following:
Dockerfile
that includescompose install
my_redis:6379
The problem arises when a new developer tries to clone the project, setup the development environment and build everything fresh. During Docker's build process, Telescope tries to connect to the endpoint
my_redis:6379
, which isn't up yet, thus fails to build. So, Docker Compose cannot up any containers, (including Redis).I wanted Telescope to work in my local development environment in Docker Compose. My current mitigation method is to add
--no-scripts
tocomposer install
during my Docker build, and instead, runcomposer dumpautoload
when the container starts.For my case, it doesn't make sense to disable Telescope. My current mitigation method has a slow container start time. Is there anyway this problem can be fixed one way or another?
I've made a StackOverflow issue a while ago: https://stackoverflow.com/questions/59810019/dockerfile-build-laravel-trying-to-connect-to-redis-service-yet-to-up My example
docker-compose.yml
is here.Steps To Reproduce:
Dockerfile
that includescompose install
. Add Redis service with namemy_redis
..env
for cache/queue/etc, and setupREDIS_HOST
to be the Docker Compose service endpoint, e.g.my_redis
docker-compose build
in this fresh project.The text was updated successfully, but these errors were encountered: