-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[BUG] Watch: docker compose watch does not show service output / container logs #11089
Comments
indeed, |
If possible, it would be great if some official guidance on how to use
|
I wonder the same thing. Was confused because watch also up-s services. |
I use two panes:
And, if I want to interact with the service (STDIN/OUT):
I like having two separate interfaces to each program (one is my app, one is watch actions)... it caught me off guard initially that watch doesn't show the output of services so I suppose there could be a justification to merge watch output with services like |
I was first excited about It does simplify the setup due to not having to use volumes and not having to restart manually when certain things change but it does add the complexity of not having a "one-for-all" development command and having to explain to team members why they would now have to run 2 commands in 2 terminal sessions instead of 1. I'm considering staying with the previous volume + compose up solution for now because of the missing logs. Would love to come back to Maybe one solution could be if the |
@ChristophP did you considered having 2 terminals ? One to show you logs, the other to run watch ? |
Yes, I did. But for developer experience it was easier to have everything in one command as it was before with the volume + compose up combination. |
Was also surprised by this |
Was surprising too, in my experience hot reload tools tend to merge start/watch into a single command, i.e. I was expecting |
I was also expecting bummer... |
I went for the following in a Makefile:
|
would be a good idea to add:
|
would also like to have logs in the terminal vom watch. But --logs would also be sufficient. Look at how skaffold does it. |
It seems that The answer is simple and has not been mentioned once in the above, all one needs to do is simply to complement the running Yes it would be indeed nice if we do not need to have two terminals or two terminal tabs running but I think we owe the future readers of this thread to at least mention the basic answer to the question. PS: it seems that there has been a merge incorporating a |
Thanks @diraneyya for pointing me on the right direction.
It does the job seamless, we can even instruct it to PS: maybe https://docs.docker.com/compose/file-watch/ should note this for future reference |
Description
docker compose watch
does not show service output (logs), only syncing info. Runningdocker compose up
with same docker-compose.yml config shows service outputs normally.Steps To Reproduce
Compose Version
Docker Environment
Anything else?
The text was updated successfully, but these errors were encountered: